ModeShape Distribution 3.0.0.Beta4

org.modeshape.jcr.bus
Class RepositoryChangeBus

java.lang.Object
  extended by 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
           
 
Constructor Summary
RepositoryChangeBus(ExecutorService executor, String systemWorkspaceName, boolean separateThreadForSystemWorkspace)
           
 
Method Summary
 boolean hasObservers()
           
 void notify(ChangeSet changeSet)
           
 boolean register(ChangeSetListener listener)
          Register the supplied observer.
 void shutdown()
           
 void start()
           
 boolean unregister(ChangeSetListener listener)
          Unregister the supplied observer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

shutdown

protected volatile boolean shutdown
Constructor Detail

RepositoryChangeBus

public RepositoryChangeBus(ExecutorService executor,
                           String systemWorkspaceName,
                           boolean separateThreadForSystemWorkspace)
Method Detail

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

ModeShape Distribution 3.0.0.Beta4

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.