|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.cluster.hazelcast.HazelcastClusterManager
@Internal public class HazelcastClusterManager
Constructor Summary | |
---|---|
HazelcastClusterManager(com.atlassian.config.ApplicationConfig applicationConfig,
java.lang.ClassLoader applicationClassLoader,
java.lang.String configResourceName,
SynchronizationManager synchronizationManager)
|
Method Summary | ||
---|---|---|
void |
configure(ClusterConfig clusterConfig)
Set a new cluster configuration. |
|
com.hazelcast.core.HazelcastInstance |
get()
|
|
java.util.Collection<ClusterNodeInformation> |
getAllNodesInformation()
|
|
ClusteredLock |
getClusteredLock(java.lang.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. |
|
ClusterInvariants |
getClusterInvariants()
Get all attributes of the server that must be consistent between cluster nodes. |
|
|
getFifoBuffer(java.lang.String name)
Get a distributed FIFO buffer |
|
Lock |
getLock(java.lang.String name)
Get a lock -- getting the lock does *not* imply that it has been acquired. |
|
com.atlassian.confluence.cluster.hazelcast.HazelcastDualLock |
getLockForName(java.lang.String key)
|
|
java.util.Map<java.lang.Integer,NodeStatus> |
getNodeStatuses()
Deprecated. |
|
java.util.Map<ClusterNodeInformation,NodeStatus> |
getNodeStatusMap()
Gets status information from all members of the cluster. |
|
int |
getPermittedClusterNodes()
|
|
java.io.Serializable |
getPublishedObject(java.lang.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 |
isClusterSupported()
Check whether this Confluence distribution is capable of running in a cluster. |
|
boolean |
isConfigured()
|
|
void |
publishEvent(ConfluenceEvent event)
Publish an event as a ClusterEventWrapper to other nodes |
|
void |
publishObject(java.lang.String key,
java.io.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 |
|
java.net.InetAddress |
resolveName(java.lang.String name)
|
|
void |
startCluster()
Start the clustering service |
|
void |
stopCluster()
Stop the clustering service |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HazelcastClusterManager(com.atlassian.config.ApplicationConfig applicationConfig, java.lang.ClassLoader applicationClassLoader, java.lang.String configResourceName, SynchronizationManager synchronizationManager)
Method Detail |
---|
public java.net.InetAddress resolveName(java.lang.String name)
resolveName
in interface NameResolver
public boolean isClusterSupported()
ClusterManager
ClusterManager.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.
isClusterSupported
in interface ClusterManager
public void publishObject(java.lang.String key, java.io.Serializable object)
ClusterManager
publishObject
in interface ClusterManager
public java.io.Serializable getPublishedObject(java.lang.String key)
ClusterManager
getPublishedObject
in interface ClusterManager
public boolean isClustered()
isClustered
in interface ClusterManager
public int getPermittedClusterNodes()
getPermittedClusterNodes
in interface ClusterManager
Integer.MAX_VALUE
, otherwise
returns 0.public ClusterInformation getClusterInformation()
ClusterManager
getClusterInformation
in interface ClusterManager
public <T> com.atlassian.core.task.FifoBuffer<T> getFifoBuffer(java.lang.String name)
ClusterManager
getFifoBuffer
in interface ClusterManager
public void publishEvent(ConfluenceEvent event)
ClusterManager
publishEvent
in interface ClusterManager
public ClusterNodeInformation getThisNodeInformation()
ClusterManager
Get the identity of this node in the cluster. ClusterNodeInformation implements equals().
getThisNodeInformation
in interface ClusterManager
public java.util.Collection<ClusterNodeInformation> getAllNodesInformation()
getAllNodesInformation
in interface ClusterManager
public void configure(ClusterConfig clusterConfig)
ClusterManager
configure
in interface ClusterManager
public boolean isConfigured()
isConfigured
in interface ClusterManager
ClusterManager.configure(ClusterConfig)
has been called with a
valid configuration, otherwise false.public void reconfigure(ClusterConfig config)
ClusterManager
reconfigure
in interface ClusterManager
@PreDestroy public void stopCluster()
ClusterManager
stopCluster
in interface ClusterManager
public void startCluster()
ClusterManager
startCluster
in interface ClusterManager
@Deprecated public java.util.Map<java.lang.Integer,NodeStatus> getNodeStatuses()
getNodeStatuses
in interface ClusterManager
public java.util.Map<ClusterNodeInformation,NodeStatus> getNodeStatusMap()
getNodeStatusMap
in interface ClusterManager
public ClusterInvariants getClusterInvariants() throws ClusterException
ClusterManager
getClusterInvariants
in interface ClusterManager
ClusterException
- if the invariants can not be gathered for some reasonpublic com.atlassian.confluence.cluster.hazelcast.HazelcastDualLock getLockForName(@Nonnull java.lang.String key)
getLockForName
in interface com.atlassian.beehive.ClusterLockService
public ClusteredLock getClusteredLock(java.lang.String key)
ClusterManager
Lock.tryLock()
or Lock.lock()
on the returned object to
acquire the lock.
getClusteredLock
in interface ClusterManager
public Lock getLock(java.lang.String name)
LockFactory
Lock.tryLock()
or Lock.lock()
on the returned object to
acquire the lock.
getLock
in interface LockFactory
public com.hazelcast.core.HazelcastInstance get()
get
in interface com.atlassian.util.concurrent.Supplier<com.hazelcast.core.HazelcastInstance>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |