org.exist.storage
Class NotificationService
java.lang.Object
java.util.AbstractMap
java.util.IdentityHashMap
org.exist.storage.NotificationService
- All Implemented Interfaces:
- Serializable, Cloneable, Map
public class NotificationService
- extends IdentityHashMap
Global notification service for document updates. Other classes
can subscribe to this service to be notified of document modifications,
removals or additions.
- Author:
- wolf
- See Also:
- Serialized Form
Nested classes/interfaces inherited from interface java.util.Map |
Map.Entry |
Methods inherited from class java.util.IdentityHashMap |
clear, clone, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values |
NotificationService
public NotificationService()
subscribe
public void subscribe(UpdateListener listener)
- Subscribe an
UpdateListener
to receive notifications.
- Parameters:
listener
-
unsubscribe
public void unsubscribe(UpdateListener listener)
- Unsubscribe an
UpdateListener
.
- Parameters:
listener
-
notifyUpdate
public void notifyUpdate(DocumentImpl document,
int event)
- Notify all subscribers that a document has been updated/removed or
a new document has been added.
- Parameters:
document
- event
-
notifyMove
public void notifyMove(NodeId oldNodeId,
StoredNode newNode)
- Notify all subscribers that a node has been moved. Nodes may be moved during a
defragmentation run.
debug
public void debug()
Copyright (C) Wolfgang Meier. All rights reserved.