public interface SingleOperation extends KeyBasedOperation
Modifier and Type | Method and Description |
---|---|
BatchOperation |
createBatchOperation(List<SingleOperation> operations)
Creates a batch operation that corresponds to the operation type of this single operation.
|
SingleOperationType |
getType()
Returns a stable identifier for the type this operation can be classified in.
|
void |
performSingleOperation(CacheWriter cacheWriter)
Perform this operation as a single execution with the provided cache writer
|
void |
throwAway(CacheWriter cacheWriter,
RuntimeException e)
Called when all retries have failed
|
getCreationTime, getKey
void performSingleOperation(CacheWriter cacheWriter)
cacheWriter
- the cache writer this operation should be performed uponBatchOperation createBatchOperation(List<SingleOperation> operations)
This batch operation will not be stored in the queue anymore and is solely used for structuring.
The data from the single operation will already be processed in the final form that will be expected by the
CacheWriter
that will be used to execute the batch operation.
operations
- the single operations that need to be regrouped in the batch operationSingleOperationType getType()
void throwAway(CacheWriter cacheWriter, RuntimeException e)
cacheWriter
- the CacheWriter to delegate toe
- the last exception encounteredCopyright © 2003–2015 Terracotta, Inc.. All rights reserved.