public abstract class AbstractIndexTable extends java.lang.Object implements IIndexTable
EXPERIMENTAL. This class or interface has been added as part of a work in progress. There is no guarantee that this API will work or that it will remain the same.
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractIndexTable.ColumnBoundListeners
Listeners interested in all tuples seeded by a single columns
|
protected class |
AbstractIndexTable.GenericBoundListeners
Listeners interested in all tuples seeded by a tuple of values
|
protected static interface |
AbstractIndexTable.IListenersWithSameMask
Represents all listeners subscribed to seeds with the given seed mask.
|
protected class |
AbstractIndexTable.UniversalListeners
Listeners interested in all tuples
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
emitNotifications |
protected TupleMask |
emptyMask |
protected Tuple |
emptyTuple |
protected java.util.List<AbstractIndexTable.IListenersWithSameMask> |
listenerGroups |
protected ITableContext |
tableContext |
Constructor and Description |
---|
AbstractIndexTable(IInputKey inputKey,
ITableContext tableContext) |
Modifier and Type | Method and Description |
---|---|
void |
addUpdateListener(Tuple seed,
IQueryRuntimeContextListener listener)
Subscribes for updates in the table, optionally seeded with the given tuple.
|
protected void |
deliverChangeNotifications(Tuple updateTuple,
boolean isInsertion)
Implementors shall call this to deliver all notifications.
|
IInputKey |
getInputKey() |
protected AbstractIndexTable.IListenersWithSameMask |
getListenerGroup(TupleMask seedMask) |
protected void |
logError(java.lang.String message) |
void |
removeUpdateListener(Tuple seed,
IQueryRuntimeContextListener listener)
Unsubscribes from updates in the table, optionally seeded with the given tuple.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
containsTuple, countTuples, enumerateTuples, enumerateValues, estimateProjectionSize, streamTuples, streamValues
protected ITableContext tableContext
protected final TupleMask emptyMask
protected final Tuple emptyTuple
protected boolean emitNotifications
protected java.util.List<AbstractIndexTable.IListenersWithSameMask> listenerGroups
public AbstractIndexTable(IInputKey inputKey, ITableContext tableContext)
public java.lang.String toString()
toString
in class java.lang.Object
public IInputKey getInputKey()
getInputKey
in interface IIndexTable
protected void logError(java.lang.String message)
protected void deliverChangeNotifications(Tuple updateTuple, boolean isInsertion)
emitNotifications
public void addUpdateListener(Tuple seed, IQueryRuntimeContextListener listener)
IIndexTable
This should be called after initializing a result cache by an enumeration method.
addUpdateListener
in interface IIndexTable
seed
- can be null or a tuple with matching arity;
if non-null, notifications will delivered only about those updates of the table
that match the seed at positions where the seed is non-null.listener
- will be notified of future changespublic void removeUpdateListener(Tuple seed, IQueryRuntimeContextListener listener)
IIndexTable
removeUpdateListener
in interface IIndexTable
seed
- can be null or a tuple with matching arity;
see IIndexTable.addUpdateListener(Tuple, IQueryRuntimeContextListener)
for definition.listener
- will no longer be notified of future changesprotected AbstractIndexTable.IListenersWithSameMask getListenerGroup(TupleMask seedMask)