public final class UnaryMaskedTupleMemory<Timestamp extends java.lang.Comparable<Timestamp>> extends MaskedTupleMemory<Timestamp>
Modifier and Type | Field and Description |
---|---|
protected IMultiLookup<java.lang.Object,Tuple> |
columnToTuples |
protected int |
keyPosition |
mask, owner
Constructor and Description |
---|
UnaryMaskedTupleMemory(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.
|
protected boolean |
addInternal(Tuple tuple,
java.lang.Object key) |
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.
|
protected boolean |
removeInternal(Tuple tuple,
java.lang.Object key) |
addWithTimestamp, addWithTimestamp, create, create, create, getMask, getOrEmpty, getOrEmptyWithTimeline, getOwner, getResumableSignatures, getResumableTimestamp, initializeWith, isPresentAtInfinity, isTimely, raiseDuplicateDeletion, raiseDuplicateInsertion, removeWithTimestamp, removeWithTimestamp, resumeAt, toString
protected IMultiLookup<java.lang.Object,Tuple> columnToTuples
protected final int keyPosition
public UnaryMaskedTupleMemory(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 void clear()
Clearable
public int getKeysetSize()
getKeysetSize
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 java.util.Iterator<Tuple> iterator()
MaskedTupleMemory
iterator
in class MaskedTupleMemory<Timestamp extends java.lang.Comparable<Timestamp>>
public java.lang.Iterable<Tuple> getSignatures()
MaskedTupleMemory
getSignatures
in class MaskedTupleMemory<Timestamp extends java.lang.Comparable<Timestamp>>
public java.util.Collection<Tuple> get(ITuple signature)
MaskedTupleMemory
get
in class MaskedTupleMemory<Timestamp extends java.lang.Comparable<Timestamp>>
public java.util.Map<Tuple,Timeline<Timestamp>> getWithTimeline(ITuple signature)
MaskedTupleMemory
getWithTimeline
in class MaskedTupleMemory<Timestamp extends java.lang.Comparable<Timestamp>>
public boolean remove(Tuple tuple, Tuple signature)
MaskedTupleMemory
remove
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 boolean remove(Tuple tuple)
MaskedTupleMemory
remove
in class MaskedTupleMemory<Timestamp extends java.lang.Comparable<Timestamp>>
tuple
- the tuple to be removed from the memorypublic boolean add(Tuple tuple, Tuple signature)
MaskedTupleMemory
add
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 add(Tuple tuple)
MaskedTupleMemory
add
in class MaskedTupleMemory<Timestamp extends java.lang.Comparable<Timestamp>>
tuple
- the tuple to be added to the memoryprotected boolean addInternal(Tuple tuple, java.lang.Object key)
protected boolean removeInternal(Tuple tuple, java.lang.Object key)