Package org.cache2k.core
Class OperationCompletion<K>
- java.lang.Object
-
- org.cache2k.core.OperationCompletion<K>
-
public class OperationCompletion<K> extends Object
Completes when each operation for a key completes and propagates exception. At the moment the keys are not used and just a simple count is done. Later we may do additional bookkeeping and fault detection based on the keys.- Author:
- Jens Wilke
-
-
Constructor Summary
Constructors Constructor Description OperationCompletion(Set<K> keys)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
complete(K key, Throwable exception)
Notify that operation for one key has been completed.CompletableFuture<Void>
getFuture()
-
-
-
Method Detail
-
complete
public void complete(K key, Throwable exception)
Notify that operation for one key has been completed. Calls listeners when all keys of the bulk operation have been processed.- Parameters:
key
- key which operation completed. The key is not used internally at the moment. May be used at a later time for debugging or error reporting purposes.exception
- exception if completed exceptionally, or null on success
-
getFuture
public CompletableFuture<Void> getFuture()
-
-