Package org.apache.storm.trident.testing
Class MemoryMapState<T>
- java.lang.Object
-
- org.apache.storm.trident.testing.MemoryMapState<T>
-
- All Implemented Interfaces:
ITupleCollection,MapState<T>,ReadOnlyMapState<T>,RemovableMapState<T>,ReadOnlySnapshottable<T>,Snapshottable<T>,State
- Direct Known Subclasses:
DebugMemoryMapState
public class MemoryMapState<T> extends Object implements Snapshottable<T>, ITupleCollection, MapState<T>, RemovableMapState<T>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMemoryMapState.Factory
-
Constructor Summary
Constructors Constructor Description MemoryMapState(String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeginCommit(Long txid)voidcommit(Long txid)Tget()Iterator<List<Object>>getTuples()List<T>multiGet(List<List<Object>> keys)voidmultiPut(List<List<Object>> keys, List<T> vals)voidmultiRemove(List<List<Object>> keys)List<T>multiUpdate(List<List<Object>> keys, List<ValueUpdater> updaters)voidset(T o)Tupdate(ValueUpdater updater)
-
-
-
Constructor Detail
-
MemoryMapState
public MemoryMapState(String id)
-
-
Method Detail
-
update
public T update(ValueUpdater updater)
- Specified by:
updatein interfaceSnapshottable<T>
-
set
public void set(T o)
- Specified by:
setin interfaceSnapshottable<T>
-
get
public T get()
- Specified by:
getin interfaceReadOnlySnapshottable<T>
-
beginCommit
public void beginCommit(Long txid)
- Specified by:
beginCommitin interfaceState
-
getTuples
public Iterator<List<Object>> getTuples()
- Specified by:
getTuplesin interfaceITupleCollection
-
multiUpdate
public List<T> multiUpdate(List<List<Object>> keys, List<ValueUpdater> updaters)
- Specified by:
multiUpdatein interfaceMapState<T>
-
multiGet
public List<T> multiGet(List<List<Object>> keys)
- Specified by:
multiGetin interfaceReadOnlyMapState<T>
-
multiRemove
public void multiRemove(List<List<Object>> keys)
- Specified by:
multiRemovein interfaceRemovableMapState<T>
-
-