Package org.infinispan.commons.api
Interface BatchingCache
-
- All Known Subinterfaces:
AdvancedCache<K,V>
,Cache<K,V>
,SecureCache<K,V>
public interface BatchingCache
The BatchingCache is implemented by all caches which support batching- Since:
- 6.0
- Author:
- Tristan Tarrant
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
endBatch(boolean successful)
Completes a batch if one has been started usingstartBatch()
.boolean
startBatch()
Starts a batch.
-
-
-
Method Detail
-
startBatch
boolean startBatch()
Starts a batch. All operations on the current client thread are performed as a part of this batch, with locks held for the duration of the batch and any remote calls delayed till the end of the batch.- Returns:
- true if a batch was successfully started; false if one was available and already running.
-
endBatch
void endBatch(boolean successful)
Completes a batch if one has been started usingstartBatch()
. If no batch has been started, this is a no-op.- Parameters:
successful
- if true, the batch completes, otherwise the batch is aborted and changes are not committed.
-
-