public final class DefaultMaskedTupleMemory<Timestamp extends java.lang.Comparable<Timestamp>> extends MaskedTupleMemory<Timestamp>
| Modifier and Type | Field and Description |
|---|---|
protected IMultiLookup<Tuple,Tuple> |
signatureToTuples
Maps a signature tuple to the bucket of tuples with the given signature.
|
mask, owner| Constructor and Description |
|---|
DefaultMaskedTupleMemory(TupleMask mask,
CollectionsFactory.MemoryType bucketType,
java.lang.Object owner) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(Tuple tuple)
Adds a tuple occurrence to the memory.
|
boolean |
add(Tuple tuple,
Tuple signature)
Adds a tuple occurrence to the memory with the given signature.
|
void |
clear()
Clear all partial matchings stored in memory
|
java.util.Collection<Tuple> |
get(ITuple signature)
Retrieves tuples that have the specified signature
|
int |
getKeysetSize() |
java.lang.Iterable<Tuple> |
getSignatures()
Retrieves a read-only view of exactly those signatures for which at least one tuple is stored
|
int |
getTotalSize() |
java.util.Map<Tuple,Timeline<Timestamp>> |
getWithTimeline(ITuple signature)
Retrieves the tuples and their associated timelines that have the specified signature.
|
java.util.Iterator<Tuple> |
iterator()
Iterates over distinct tuples stored in the memory, regardless of their signatures.
|
boolean |
remove(Tuple tuple)
Removes a tuple occurrence from the memory.
|
boolean |
remove(Tuple tuple,
Tuple signature)
Removes a tuple occurrence from the memory with the given signature.
|
addWithTimestamp, addWithTimestamp, create, create, create, getMask, getOrEmpty, getOrEmptyWithTimeline, getOwner, getResumableSignatures, getResumableTimestamp, initializeWith, isPresentAtInfinity, isTimely, raiseDuplicateDeletion, raiseDuplicateInsertion, removeWithTimestamp, removeWithTimestamp, resumeAt, toStringprotected IMultiLookup<Tuple,Tuple> signatureToTuples
public DefaultMaskedTupleMemory(TupleMask mask, CollectionsFactory.MemoryType bucketType, java.lang.Object owner)
mask - The mask used to index the matchingsowner - the object "owning" this memorybucketType - the kind of tuple collection maintained for each indexer bucketpublic boolean add(Tuple tuple)
MaskedTupleMemoryadd in class MaskedTupleMemory<Timestamp extends java.lang.Comparable<Timestamp>>tuple - the tuple to be added to the memorypublic boolean add(Tuple tuple, Tuple signature)
MaskedTupleMemoryadd in class MaskedTupleMemory<Timestamp extends java.lang.Comparable<Timestamp>>tuple - the tuple to be added to the memorysignature - precomputed footprint of the tuple according to the maskpublic boolean remove(Tuple tuple)
MaskedTupleMemoryremove in class MaskedTupleMemory<Timestamp extends java.lang.Comparable<Timestamp>>tuple - the tuple to be removed from the memorypublic boolean remove(Tuple tuple, Tuple signature)
MaskedTupleMemoryremove in class MaskedTupleMemory<Timestamp extends java.lang.Comparable<Timestamp>>tuple - the tuple to be removed from the memorysignature - precomputed footprint of the tuple according to the maskpublic java.util.Map<Tuple,Timeline<Timestamp>> getWithTimeline(ITuple signature)
MaskedTupleMemorygetWithTimeline in class MaskedTupleMemory<Timestamp extends java.lang.Comparable<Timestamp>>public java.util.Collection<Tuple> get(ITuple signature)
MaskedTupleMemoryget in class MaskedTupleMemory<Timestamp extends java.lang.Comparable<Timestamp>>public void clear()
Clearablepublic java.lang.Iterable<Tuple> getSignatures()
MaskedTupleMemorygetSignatures in class MaskedTupleMemory<Timestamp extends java.lang.Comparable<Timestamp>>public java.util.Iterator<Tuple> iterator()
MaskedTupleMemoryiterator in class MaskedTupleMemory<Timestamp extends java.lang.Comparable<Timestamp>>public int getTotalSize()
getTotalSize in class MaskedTupleMemory<Timestamp extends java.lang.Comparable<Timestamp>>This is currently not cached but computed on demand. It is therefore not efficient, and shall only be used for debug / profiling purposes.
public int getKeysetSize()
getKeysetSize in class MaskedTupleMemory<Timestamp extends java.lang.Comparable<Timestamp>>