ModeShape Distribution 3.6.0.Final

org.modeshape.jcr
Class BackupObserver

java.lang.Object
  extended by org.modeshape.jcr.BackupObserver
All Implemented Interfaces:
ChangeSetListener

@ThreadSafe
public class BackupObserver
extends Object
implements ChangeSetListener

A ChangeSetListener that captures the changes being made in a repository, forwarding the node and property changes to the supplied queue, and capturing the set of binary keys that are marked as being used or unused.

See Also:
BackupService

Constructor Summary
protected BackupObserver(Queue<NodeKey> changedNodes)
           
 
Method Summary
 Iterable<BinaryKey> getUnusedBinaryKeys()
          Get the binary keys that have been marked as being unused during the time this observer was listening to the repository.
 Iterable<BinaryKey> getUsedBinaryKeys()
          Get the binary keys that have been marked as being used during the time this observer was listening to the repository.
 void notify(ChangeSet changeSet)
          Notifies a listener of the given changes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BackupObserver

protected BackupObserver(Queue<NodeKey> changedNodes)
Method Detail

notify

public void notify(ChangeSet changeSet)
Description copied from interface: ChangeSetListener
Notifies a listener of the given changes.

Specified by:
notify in interface ChangeSetListener
Parameters:
changeSet - a non-null ChangeSet

getUnusedBinaryKeys

public Iterable<BinaryKey> getUnusedBinaryKeys()
Get the binary keys that have been marked as being unused during the time this observer was listening to the repository.

Returns:
the unused binary keys; never null, but possibly empty

getUsedBinaryKeys

public Iterable<BinaryKey> getUsedBinaryKeys()
Get the binary keys that have been marked as being used during the time this observer was listening to the repository.

Returns:
the used binary keys; never null, but possibly empty

ModeShape Distribution 3.6.0.Final

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