Package org.apache.storm.trident.testing
Class LRUMemoryMapState<T>
- java.lang.Object
-
- org.apache.storm.trident.testing.LRUMemoryMapState<T>
-
- All Implemented Interfaces:
ITupleCollection
,MapState<T>
,ReadOnlyMapState<T>
,ReadOnlySnapshottable<T>
,Snapshottable<T>
,State
public class LRUMemoryMapState<T> extends Object implements Snapshottable<T>, ITupleCollection, MapState<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LRUMemoryMapState.Factory
-
Constructor Summary
Constructors Constructor Description LRUMemoryMapState(int cacheSize, String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beginCommit(Long txid)
void
commit(Long txid)
T
get()
Iterator<List<Object>>
getTuples()
List<T>
multiGet(List<List<Object>> keys)
void
multiPut(List<List<Object>> keys, List<T> vals)
List<T>
multiUpdate(List<List<Object>> keys, List<ValueUpdater> updaters)
void
set(T o)
T
update(ValueUpdater updater)
-
-
-
Constructor Detail
-
LRUMemoryMapState
public LRUMemoryMapState(int cacheSize, String id)
-
-
Method Detail
-
update
public T update(ValueUpdater updater)
- Specified by:
update
in interfaceSnapshottable<T>
-
set
public void set(T o)
- Specified by:
set
in interfaceSnapshottable<T>
-
get
public T get()
- Specified by:
get
in interfaceReadOnlySnapshottable<T>
-
beginCommit
public void beginCommit(Long txid)
- Specified by:
beginCommit
in interfaceState
-
getTuples
public Iterator<List<Object>> getTuples()
- Specified by:
getTuples
in interfaceITupleCollection
-
multiUpdate
public List<T> multiUpdate(List<List<Object>> keys, List<ValueUpdater> updaters)
- Specified by:
multiUpdate
in interfaceMapState<T>
-
-