Package org.apache.bookkeeper.proto
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 java.lang.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) java.util.concurrent.ExecutorService
callbackExecutor
(package private) org.apache.zookeeper.AsyncCallback.VoidCallback
cb
(package private) java.lang.Object
context
(package private) java.util.concurrent.atomic.AtomicInteger
done
(package private) java.util.concurrent.LinkedBlockingQueue<java.lang.Integer>
exceptions
(package private) int
expected
(package private) int
failureRc
(package private) int
successRc
-
Constructor Summary
Constructors Constructor Description MultiCallback(int expected, org.apache.zookeeper.AsyncCallback.VoidCallback cb, java.lang.Object context, int successRc, int failureRc)
MultiCallback(int expected, org.apache.zookeeper.AsyncCallback.VoidCallback cb, java.lang.Object context, int successRc, int failureRc, java.util.concurrent.ExecutorService callbackExecutor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
processResult(int rc, java.lang.String path, java.lang.Object ctx)
-
-
-
Field Detail
-
expected
final int expected
-
failureRc
final int failureRc
-
successRc
final int successRc
-
cb
final org.apache.zookeeper.AsyncCallback.VoidCallback cb
-
context
final java.lang.Object context
-
callbackExecutor
final java.util.concurrent.ExecutorService callbackExecutor
-
done
final java.util.concurrent.atomic.AtomicInteger done
-
exceptions
final java.util.concurrent.LinkedBlockingQueue<java.lang.Integer> exceptions
-
-
Constructor Detail
-
MultiCallback
public MultiCallback(int expected, org.apache.zookeeper.AsyncCallback.VoidCallback cb, java.lang.Object context, int successRc, int failureRc)
-
MultiCallback
public MultiCallback(int expected, org.apache.zookeeper.AsyncCallback.VoidCallback cb, java.lang.Object context, int successRc, int failureRc, java.util.concurrent.ExecutorService callbackExecutor)
-
-