Class ExistenceChangedOperation

All Implemented Interfaces:
WatchedEventProvider, org.apache.zookeeper.Watcher

public class ExistenceChangedOperation extends FutureEventDrivenOperation<String>
DataChangedOperation is an watch driven operation. It will wait for an watched event indicating that a given node has been created or deleted.
  • Constructor Details

    • ExistenceChangedOperation

      public ExistenceChangedOperation(org.apache.zookeeper.ZooKeeper connection, String znode)
  • Method Details

    • installWatch

      protected void installWatch()
      Description copied from class: FutureEventDrivenOperation
      Install the watcher to receive WatchedEvents. It should use the appropriate asynchronous ZooKeeper call to do this so as not to block the route from starting. Once one of the watched for types of event is received a call is made to getResult, which can use the appropriate synchronous call to retrieve the actual data.
      Specified by:
      installWatch in class FutureEventDrivenOperation<String>
    • getResult

      public OperationResult<String> getResult()
      Description copied from class: ZooKeeperOperation
      Gets the result of this zookeeper operation, i.e. some data and the associated node stats
      Specified by:
      getResult in class ZooKeeperOperation<String>