Class ChangeDispatcher
- java.lang.Object
 - 
- org.apache.jackrabbit.oak.spi.commit.ChangeDispatcher
 
 
- 
- All Implemented Interfaces:
 Observable,Observer
public class ChangeDispatcher extends java.lang.Object implements Observable, Observer
AChangeDispatcherinstance dispatches content changes to registeredObservers.Changes are reported by calling
contentChanged(NodeState, CommitInfo).The
addObserver(Observer)method registers anObserverfor receiving notifications for all changes reported to this instance. 
- 
- 
Constructor Summary
Constructors Constructor Description ChangeDispatcher(@NotNull NodeState root)Create a new instance for dispatching content changes 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull java.io.CloseableaddObserver(Observer observer)Register a newObserverfor receiving notifications about changes reported to this change dispatcher.voidcontentChanged(@NotNull NodeState root, @NotNull CommitInfo info)Observes a content change. 
 - 
 
- 
- 
Constructor Detail
- 
ChangeDispatcher
public ChangeDispatcher(@NotNull @NotNull NodeState root)Create a new instance for dispatching content changes- Parameters:
 root- current root node state
 
 - 
 
- 
Method Detail
- 
addObserver
@NotNull public @NotNull java.io.Closeable addObserver(Observer observer)
Register a newObserverfor receiving notifications about changes reported to this change dispatcher. Changes are reported synchronously and clients need to ensure to no block any length of time (e.g. by relaying through aBackgroundObserver).Clients need to call
Closeable.close()close} on the returnedCloseableinstance to stop receiving notifications.- Specified by:
 addObserverin interfaceObservable- Returns:
 - a 
Closeableinstance 
 
- 
contentChanged
public void contentChanged(@NotNull @NotNull NodeState root, @NotNull @NotNull CommitInfo info)Description copied from interface:ObserverObserves a content change. See theObserverclass javadocs and relevant repository and observer registration details for more information on when and how this method gets called.- Specified by:
 contentChangedin interfaceObserver- Parameters:
 root- root state of the repositoryinfo- commit information
 
 - 
 
 -