public class CacheWriterProcessor extends Object implements ItemProcessor<SingleAsyncOperation>
ItemProcessor that delegates the processing to a CacheWriter instance
Instances of this class will be used when items are processed one by one. Note that CacheWriter instances
will not be shared across a Terracotta DSO cluster and are intended to be local on a node. They are tied to an
individual write behind queue. You're thus free to use local resources in an CacheWriter, like database
connections or file handles.
| Constructor and Description |
|---|
CacheWriterProcessor(CacheWriter cacheWriter)
Creates a new item processor for a specific cache writer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
process(Collection<SingleAsyncOperation> items) |
void |
process(SingleAsyncOperation item) |
void |
throwAway(SingleAsyncOperation item,
RuntimeException runtimeException) |
public CacheWriterProcessor(CacheWriter cacheWriter)
cacheWriter - the cache writer for which the wrapper has to be createdpublic void process(SingleAsyncOperation item)
process in interface ItemProcessor<SingleAsyncOperation>public void process(Collection<SingleAsyncOperation> items)
process in interface ItemProcessor<SingleAsyncOperation>public void throwAway(SingleAsyncOperation item, RuntimeException runtimeException)
throwAway in interface ItemProcessor<SingleAsyncOperation>Copyright © 2003–2024 Terracotta, Inc.. All rights reserved.