public class

TangosolClusterManager

extends Object
implements ClusterManager
java.lang.Object
   ↳ com.atlassian.confluence.cluster.coherence.TangosolClusterManager

Class Overview

Implementation of a cluster manager that uses Tangosol Coherence

Summary

Nested Classes
class TangosolClusterManager.CacheServices  
class TangosolClusterManager.RetryOperation  
Public Constructors
TangosolClusterManager(ApplicationConfig applicationConfig, ClassLoader applicationClassLoader, SynchronizationManager synchronizationManager)
Public Methods
void configure(ClusterConfig config)
Set a new cluster config but do not cycle the service
@Deprecated static Collection<Service> enumerateCacheServices()
This method is deprecated. since 3.0, use getCacheServices()
static TangosolClusterManager.CacheServices getCacheServices()
ClusterInformation getClusterInformation()
Get information about the running cluster.
ClusterInvariants getClusterInvariants()
Get all attributes of the server that must be consistent between cluster nodes.
ClusteredLock getClusteredLock(String key)
Get a distributed lock -- getting the lock does *not* imply that it has been acquired.
FifoBuffer getFifoBuffer(String name)
Get a distributed FIFO buffer
Lock getLock(String key)
Get a lock -- getting the lock does *not* imply that it has been acquired.
Map<IntegerNodeStatus> getNodeStatuses()
Gets status information from all members of the cluster.
Map getNodeStatusesForCluster()
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.

void init()
Start the Invocation Service to listen for invocations (@see EventInvocable) from other nodes in the cluster.
boolean isClusterSupported()
Check whether this Confluence distribution is capable of running in a 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)
Bootstrap a new cluster configuration.
InetAddress resolveName(String name)
Use this manager to resolve a cluster name to an IP address
void shutdown()
void startCluster()
Start the clustering service
void stopCluster()
Stop the clustering service
Protected Methods
void registerClusterMemberEventLogger()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.confluence.cluster.ClusterManager
From interface com.atlassian.confluence.cluster.NameResolver
From interface com.atlassian.confluence.concurrent.LockFactory

Public Constructors

public TangosolClusterManager (ApplicationConfig applicationConfig, ClassLoader applicationClassLoader, SynchronizationManager synchronizationManager)

Public Methods

public void configure (ClusterConfig config)

Set a new cluster config but do not cycle the service

Parameters
config Cluster config

@Deprecated public static Collection<Service> enumerateCacheServices ()

This method is deprecated.
since 3.0, use getCacheServices()

Returns
  • A collection of cache services running in the cluster

public static TangosolClusterManager.CacheServices getCacheServices ()

public ClusterInformation getClusterInformation ()

Get information about the running cluster.

public ClusterInvariants getClusterInvariants ()

Get all attributes of the server that must be consistent between cluster nodes.

Returns
  • the cluster invariants of this server

public ClusteredLock getClusteredLock (String key)

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

public FifoBuffer getFifoBuffer (String name)

Get a distributed FIFO buffer

public Lock getLock (String key)

Get a lock -- getting the lock does *not* imply that it has been acquired. Call tryLock() or lock() on the returned object to acquire the lock.

public Map<IntegerNodeStatus> getNodeStatuses ()

Gets status information from all members of the cluster.

Returns
  • a map of node IDs to node statuses

public Map getNodeStatusesForCluster ()

public int getPermittedClusterNodes ()

public Serializable getPublishedObject (String key)

Retrieve an object which another node in the cluster has shared, return null if no such object exists

Returns
  • a shared Object

public ClusterNodeInformation getThisNodeInformation ()

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

Returns
  • the identity of this node in the cluster. May return null if the node is not in a cluster.

public void init ()

Start the Invocation Service to listen for invocations (@see EventInvocable) from other nodes in the cluster.

public boolean isClusterSupported ()

Check whether this Confluence distribution is capable of running in a cluster. This differs from isClustered() in that it will return true if the code to support clustering is present, even if this instance does not have a clustered license or a current clustering configuration.

Returns
  • true if this Confluence installation is capable of running in a cluster

public boolean isClustered ()

public boolean isConfigured ()

public void publishEvent (ConfluenceEvent event)

Publish an event as a ClusterEventWrapper to other nodes

public void publishObject (String key, Serializable object)

Share an object to the cluster under a particular key. Note that once an object is published it will remain available for the duration of the cluster.

public void reconfigure (ClusterConfig config)

Bootstrap a new cluster configuration. This will cycle the clustering service

Parameters
config Cluster config

public InetAddress resolveName (String name)

Use this manager to resolve a cluster name to an IP address

Parameters
name Name of the cluster
Returns
  • Address of the cluster

public void shutdown ()

public void startCluster ()

Start the clustering service

public void stopCluster ()

Stop the clustering service

Protected Methods

protected void registerClusterMemberEventLogger ()