|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.jcr.bus.ClusteredRepositoryChangeBus
@ThreadSafe public final class ClusteredRepositoryChangeBus
Implementation of a ChangeBus
which can run in a cluster, via JGroups. This bus wraps around another bus, to which it
delegates all "local" processing of events.
Nested Class Summary | |
---|---|
protected class |
ClusteredRepositoryChangeBus.Listener
|
protected class |
ClusteredRepositoryChangeBus.Receiver
|
Field Summary | |
---|---|
protected RepositoryConfiguration.Clustering |
clusteringConfiguration
The clustering configuration |
protected ChangeBus |
delegate
The wrapped standalone bus to which standard bus operations are delegated |
protected AtomicBoolean |
isOpen
Flag that dictates whether this bus has connected to the cluster. |
protected static Logger |
LOGGER
|
protected AtomicBoolean |
multipleAddressesInCluster
Flag that dictates whether there are multiple participants in the cluster; if not, then the changes are propagated only to the local observers. |
Constructor Summary | |
---|---|
ClusteredRepositoryChangeBus(RepositoryConfiguration.Clustering clusteringConfiguration,
ChangeBus delegate)
|
Method Summary | |
---|---|
protected static ChangeSet |
deserialize(byte[] data)
|
boolean |
hasObservers()
|
boolean |
isStarted()
Return whether this bus has been started and not yet shut down . |
protected void |
logReceivedOperation(ChangeSet changeSet)
|
protected void |
logSendOperation(ChangeSet changeSet)
|
void |
notify(ChangeSet changeSet)
|
boolean |
register(ChangeSetListener observer)
Register the supplied observer. |
protected static byte[] |
serialize(ChangeSet changes)
|
void |
shutdown()
|
void |
start()
|
boolean |
unregister(ChangeSetListener observer)
Unregister the supplied observer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final Logger LOGGER
protected final ChangeBus delegate
protected final AtomicBoolean isOpen
protected final AtomicBoolean multipleAddressesInCluster
protected final RepositoryConfiguration.Clustering clusteringConfiguration
Constructor Detail |
---|
public ClusteredRepositoryChangeBus(RepositoryConfiguration.Clustering clusteringConfiguration, ChangeBus delegate)
Method Detail |
---|
public void start()
start
in interface ChangeBus
public boolean hasObservers()
hasObservers
in interface ChangeBus
public boolean isStarted()
started
and not yet shut down
.
start()
has been called but shutdown()
has not, or false otherwisepublic void shutdown()
shutdown
in interface ChangeBus
public void notify(ChangeSet changeSet)
notify
in interface ChangeSetListener
protected final void logSendOperation(ChangeSet changeSet)
protected final void logReceivedOperation(ChangeSet changeSet)
public boolean register(ChangeSetListener observer)
Observable
register
in interface Observable
observer
- the observer to be added; may be null
public boolean unregister(ChangeSetListener observer)
Observable
unregister
in interface Observable
observer
- the observer to be removed; may not be null
protected static byte[] serialize(ChangeSet changes) throws Exception
Exception
protected static ChangeSet deserialize(byte[] data) throws Exception
Exception
|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |