com.atlassian.confluence.cluster
Interface ClusterManager

All Superinterfaces:
LockFactory, NameResolver
All Known Implementing Classes:
TangosolClusterManager

public interface ClusterManager
extends NameResolver, LockFactory


Method Summary
 void configure(ClusterConfig config)
          Set a new cluster configuration.
 ClusteredLock getClusteredLock(String key)
          Get a distributed lock -- getting the lock does *not* imply that it has been acquired.
 ClusterInformation getClusterInformation()
          Get information about the running cluster.
 FifoBuffer getFifoBuffer(String name)
          Get a distributed FIFO buffer
 com.tangosol.net.InvocationService getInvocationService()
           
 int getPermittedClusterNodes()
           
 Serializable getPublishedObject(String key)
          Retrieve an object which another node in the cluster has shared, return null if no such object exists
 ClusterNodeInformation getThisNodeInformation()
          Get the identity of this node in the cluster.
 boolean isClustered()
           
 boolean isConfigured()
           
 void publishEvent(ConfluenceEvent event)
          Publish an event as a ClusterEventWrapper to other nodes
 void publishObject(String key, Serializable object)
          Share an object to the cluster under a particular key
 void reconfigure(ClusterConfig config)
          Set a new cluster configuration and cycle the service
 void startCluster()
          Start the clustering service
 void stopCluster()
          Stop the clustering service
 
Methods inherited from interface com.atlassian.confluence.cluster.NameResolver
resolveName
 
Methods inherited from interface com.atlassian.confluence.concurrent.LockFactory
getLock
 

Method Detail

publishObject

public void publishObject(String key,
                          Serializable object)
Share an object to the cluster under a particular key

Parameters:
key -
object -

getPublishedObject

public Serializable getPublishedObject(String key)
Retrieve an object which another node in the cluster has shared, return null if no such object exists

Parameters:
key -
Returns:
a shared Object

isClustered

public boolean isClustered()
Returns:
true if this instance is configured to allow clustering with other nodes

getPermittedClusterNodes

public int getPermittedClusterNodes()
Returns:
the number of clustered nodes permitted by the license. Returns a value less than or equal to zero if clustering is not permitted.

getClusterInformation

public ClusterInformation getClusterInformation()
Get information about the running cluster.


getClusteredLock

public ClusteredLock getClusteredLock(String key)
Get a distributed lock -- getting the lock does *not* imply that it has been acquired. Call Lock.tryLock() or Lock.lock() on the returned object to acquire the lock.


getFifoBuffer

public FifoBuffer getFifoBuffer(String name)
Get a distributed FIFO buffer


publishEvent

public void publishEvent(ConfluenceEvent event)
Publish an event as a ClusterEventWrapper to other nodes


getThisNodeInformation

public ClusterNodeInformation getThisNodeInformation()
Get the identity of this node in the cluster. ClusterNodeInformation implements equals()


configure

public void configure(ClusterConfig config)
Set a new cluster configuration.

Parameters:
config -

isConfigured

public boolean isConfigured()
Returns:
true if configure(ClusterConfig) has been called with a valid configuration, otherwise false.

reconfigure

public void reconfigure(ClusterConfig config)
Set a new cluster configuration and cycle the service

Parameters:
config -

stopCluster

public void stopCluster()
Stop the clustering service


startCluster

public void startCluster()
Start the clustering service


getInvocationService

public com.tangosol.net.InvocationService getInvocationService()
Returns:
the Tangosol Coherence InvocationService which can be used for running code as an Invocable on all nodes in the cluster.
See Also:
Tangosol cluster services


Confluence is developed by Atlassian.