Class BookkeeperInternalCallbacks.MultiCallback

java.lang.Object
org.apache.bookkeeper.proto.BookkeeperInternalCallbacks.MultiCallback
All Implemented Interfaces:
org.apache.zookeeper.AsyncCallback, org.apache.zookeeper.AsyncCallback.VoidCallback
Enclosing class:
BookkeeperInternalCallbacks

public static class BookkeeperInternalCallbacks.MultiCallback extends Object implements org.apache.zookeeper.AsyncCallback.VoidCallback
This is a multi callback object that waits for all of the multiple async operations to complete. If any fail, then we invoke the final callback with a provided failureRc
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.zookeeper.AsyncCallback

    org.apache.zookeeper.AsyncCallback.ACLCallback, org.apache.zookeeper.AsyncCallback.AllChildrenNumberCallback, org.apache.zookeeper.AsyncCallback.Children2Callback, org.apache.zookeeper.AsyncCallback.ChildrenCallback, org.apache.zookeeper.AsyncCallback.Create2Callback, org.apache.zookeeper.AsyncCallback.DataCallback, org.apache.zookeeper.AsyncCallback.EphemeralsCallback, org.apache.zookeeper.AsyncCallback.MultiCallback, org.apache.zookeeper.AsyncCallback.StatCallback, org.apache.zookeeper.AsyncCallback.StringCallback, org.apache.zookeeper.AsyncCallback.VoidCallback
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) final ExecutorService
     
    (package private) final org.apache.zookeeper.AsyncCallback.VoidCallback
     
    (package private) final Object
     
    (package private) final AtomicInteger
     
    (package private) final LinkedBlockingQueue<Integer>
     
    (package private) final int
     
    (package private) final int
     
    (package private) final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    MultiCallback(int expected, org.apache.zookeeper.AsyncCallback.VoidCallback cb, Object context, int successRc, int failureRc)
     
    MultiCallback(int expected, org.apache.zookeeper.AsyncCallback.VoidCallback cb, Object context, int successRc, int failureRc, ExecutorService callbackExecutor)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    processResult(int rc, String path, Object ctx)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • expected

      final int expected
    • failureRc

      final int failureRc
    • successRc

      final int successRc
    • cb

      final org.apache.zookeeper.AsyncCallback.VoidCallback cb
    • context

      final Object context
    • callbackExecutor

      final ExecutorService callbackExecutor
    • done

      final AtomicInteger done
    • exceptions

      final LinkedBlockingQueue<Integer> exceptions
  • Constructor Details

    • MultiCallback

      public MultiCallback(int expected, org.apache.zookeeper.AsyncCallback.VoidCallback cb, Object context, int successRc, int failureRc)
    • MultiCallback

      public MultiCallback(int expected, org.apache.zookeeper.AsyncCallback.VoidCallback cb, Object context, int successRc, int failureRc, ExecutorService callbackExecutor)
  • Method Details

    • processResult

      public void processResult(int rc, String path, Object ctx)
      Specified by:
      processResult in interface org.apache.zookeeper.AsyncCallback.VoidCallback