org.modeshape.jcr.bus
Class RepositoryChangeBus
java.lang.Object
org.modeshape.jcr.bus.RepositoryChangeBus
- All Implemented Interfaces:
- ChangeBus, ChangeSetListener, Observable
@ThreadSafe
public final class RepositoryChangeBus
- extends Object
- implements ChangeBus
A standard ChangeBus
implementation.
Field Summary |
protected boolean |
shutdown
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
shutdown
protected volatile boolean shutdown
RepositoryChangeBus
public RepositoryChangeBus(ExecutorService executor,
String systemWorkspaceName,
boolean separateThreadForSystemWorkspace)
start
public void start()
- Specified by:
start
in interface ChangeBus
shutdown
public void shutdown()
- Specified by:
shutdown
in interface ChangeBus
register
public boolean register(ChangeSetListener listener)
- Description copied from interface:
Observable
- Register the supplied observer. This method does nothing if the observer reference is null.
- Specified by:
register
in interface Observable
- Parameters:
listener
- the observer to be added; may be null
- Returns:
- true if the observer was added, or false if the observer was null, if the observer was already registered, or if
the observer could not be added
unregister
public boolean unregister(ChangeSetListener listener)
- Description copied from interface:
Observable
- Unregister the supplied observer. This method does nothing if the observer reference is null.
- Specified by:
unregister
in interface Observable
- Parameters:
listener
- the observer to be removed; may not be null
- Returns:
- true if the observer was removed, or false if the observer was null or if the observer was not registered on this
source
notify
public void notify(ChangeSet changeSet)
- Specified by:
notify
in interface ChangeSetListener
hasObservers
public boolean hasObservers()
- Specified by:
hasObservers
in interface ChangeBus
Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.