public interface

ClusterService

com.atlassian.bitbucket.cluster.ClusterService

Class Overview

Provides access to cluster details for the instance.

Summary

Public Methods
@Nonnull ClusterInformation getInformation()
@Nonnull String getNodeId()
Convenience method for obtaining the ID for the local node.
boolean isAvailable()
boolean isClustered()

Public Methods

@Nonnull public ClusterInformation getInformation ()

Returns
  • details about the cluster and its nodes

@Nonnull public String getNodeId ()

Convenience method for obtaining the ID for the local node. Calling the method is equivalent to calling getInformation().getLocalNode().getId()

Returns
  • the ID of the local node

public boolean isAvailable ()

Returns
  • true if clustering is available; otherwise, false

public boolean isClustered ()

Returns
  • true if clustering is available and at least two nodes have joined the cluster