Class ClockFilter
- All Implemented Interfaces:
Expression
,Filter
,LogOutputAppendable
,LivenessManager
,LivenessNode
,LivenessReferent
,ReindexingFilter
,WhereFilter
,NotificationQueue.Dependency
,Serializable
,Runnable
- Direct Known Subclasses:
SortedClockFilter
,UnsortedClockFilter
public abstract class ClockFilter
extends WhereFilterLivenessArtifactImpl
implements ReindexingFilter, Runnable, NotificationQueue.Dependency
Boilerplate super-class for various clock-oriented filters.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static final class
Representation of a contiguous key range with monotonically nondecreasing timestamp values.Nested classes/interfaces inherited from interface io.deephaven.api.filter.Filter
Filter.Visitor<T>
Nested classes/interfaces inherited from interface io.deephaven.engine.table.impl.select.WhereFilter
WhereFilter.PreviousFilteringNotSupported, WhereFilter.RecomputeListener
-
Field Summary
Fields inherited from class io.deephaven.engine.table.impl.select.WhereFilterLivenessArtifactImpl
updateGraph
Fields inherited from interface io.deephaven.engine.table.impl.select.WhereFilter
ZERO_LENGTH_WHERE_FILTER_ARRAY
-
Constructor Summary
ConstructorDescriptionClockFilter
(@NotNull String columnName, @NotNull Clock clock, boolean refreshing) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
destroy()
Attempt to release (destructively when necessary) resources held by this object.final @NotNull WritableRowSet
Filter selection to only matching rows.Get the array columns required by this select filter.Get the columns required by this select filter.final void
init
(@NotNull TableDefinition tableDefinition) Initialize this filter given the table definition.protected abstract @Nullable WritableRowSet
initializeAndGetInitialIndex
(@NotNull RowSet selection, @NotNull RowSet fullSet, @NotNull Table table) boolean
Is this filter refreshing?final boolean
final void
run()
boolean
satisfied
(long step) Is this ancestor satisfied? Note that this method must be safe to call on any thread.final void
setRecomputeListener
(@NotNull WhereFilter.RecomputeListener listener) Set theWhereFilter.RecomputeListener
that should be notified if results based on this WhereFilter must be recomputed.protected abstract @Nullable WritableRowSet
Methods inherited from class io.deephaven.engine.table.impl.select.WhereFilterLivenessArtifactImpl
isAutomatedFilter, setAutomatedFilter
Methods inherited from class io.deephaven.engine.liveness.LivenessArtifact
manageWithCurrentScope
Methods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessNode
getWeakReference, initializeTransientFieldsForLiveness, onReferenceCountAtZero, tryManage, tryUnmanage, tryUnmanage
Methods inherited from class io.deephaven.engine.liveness.ReferenceCountedLivenessReferent
dropReference, tryRetainReference
Methods inherited from class io.deephaven.util.referencecounting.ReferenceCounted
append, decrementReferenceCount, forceReferenceCountToZero, getReferenceCountDebug, incrementReferenceCount, resetReferenceCount, toString, tryDecrementReferenceCount, tryIncrementReferenceCount
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.deephaven.engine.liveness.LivenessManager
manage
Methods inherited from interface io.deephaven.engine.liveness.LivenessNode
unmanage, unmanage
Methods inherited from interface io.deephaven.engine.liveness.LivenessReferent
dropReference, getReferentDescription, retainReference, tryRetainReference
Methods inherited from interface io.deephaven.base.log.LogOutputAppendable
append
Methods inherited from interface io.deephaven.engine.updategraph.NotificationQueue.Dependency
getUpdateGraph
Methods inherited from interface io.deephaven.engine.table.impl.select.ReindexingFilter
getSortColumns, requiresSorting, sortingDone
Methods inherited from interface io.deephaven.engine.table.impl.select.WhereFilter
beginOperation, canMemoize, copy, filter, filterInverse, init, invert, isAutomatedFilter, permitParallelization, setAutomatedFilter, validateSafeForRefresh, walk, walk
-
Field Details
-
columnName
-
clock
-
-
Constructor Details
-
ClockFilter
-
-
Method Details
-
init
Description copied from interface:WhereFilter
Initialize this filter given the table definition. If this filter has already been initialized, this should be a no-op, or optionally validate that the table definition is compatible with previous initialization.- Specified by:
init
in interfaceWhereFilter
- Parameters:
tableDefinition
- the definition of the table that will be filtered
-
getColumns
Description copied from interface:WhereFilter
Get the columns required by this select filter.This filter must already be initialized before calling this method.
- Specified by:
getColumns
in interfaceWhereFilter
- Returns:
- the columns used as input by this select filter.
-
getColumnArrays
Description copied from interface:WhereFilter
Get the array columns required by this select filter.This filter must already be initialized before calling this method.
- Specified by:
getColumnArrays
in interfaceWhereFilter
- Returns:
- the columns used as array input by this select filter.
-
filter
@NotNull public final @NotNull WritableRowSet filter(@NotNull @NotNull RowSet selection, @NotNull @NotNull RowSet fullSet, @NotNull @NotNull Table table, boolean usePrev) Description copied from interface:WhereFilter
Filter selection to only matching rows.- Specified by:
filter
in interfaceWhereFilter
- Parameters:
selection
- the indices that should be filtered. The selection must be a subset of fullSet, and may include rows that the engine determines need not be evaluated to produce the result. Implementations may not mutate orclose
selection
.fullSet
- the complete RowSet of the table to filter. The fullSet is used for calculating variables like "i" or "ii". Implementations may not mutate orclose
fullSet
.table
- the table to filterusePrev
- true if previous values should be used. Implementing previous value filtering is optional, and aWhereFilter.PreviousFilteringNotSupported
exception may be thrown. If a PreviousFiltering exception is thrown, then the caller must acquire the PeriodicUpdateGraph lock.- Returns:
- The subset of selection accepted by this filter; ownership passes to the caller
-
initializeAndGetInitialIndex
@Nullable protected abstract @Nullable WritableRowSet initializeAndGetInitialIndex(@NotNull @NotNull RowSet selection, @NotNull @NotNull RowSet fullSet, @NotNull @NotNull Table table) -
isSimpleFilter
public final boolean isSimpleFilter()- Specified by:
isSimpleFilter
in interfaceWhereFilter
- Returns:
- true if this is a filter that does not require any code execution, but rather is handled entirely within the database engine.
-
isRefreshing
public boolean isRefreshing()Description copied from interface:WhereFilter
Is this filter refreshing?- Specified by:
isRefreshing
in interfaceWhereFilter
- Returns:
- if this filter is refreshing
-
satisfied
public boolean satisfied(long step) Description copied from interface:NotificationQueue.Dependency
Is this ancestor satisfied? Note that this method must be safe to call on any thread.- Specified by:
satisfied
in interfaceNotificationQueue.Dependency
- Parameters:
step
- The step for which we are testing satisfaction- Returns:
- Whether the dependency is satisfied on
step
(and will not fire subsequent notifications)
-
getUpdateGraph
- Specified by:
getUpdateGraph
in interfaceNotificationQueue.Dependency
- Returns:
- the update graph that this dependency is a part of
-
setRecomputeListener
Description copied from interface:WhereFilter
Set theWhereFilter.RecomputeListener
that should be notified if results based on this WhereFilter must be recomputed.- Specified by:
setRecomputeListener
in interfaceWhereFilter
- Parameters:
listener
- TheWhereFilter.RecomputeListener
to notify
-
destroy
protected void destroy()Description copied from class:ReferenceCountedLivenessReferent
Attempt to release (destructively when necessary) resources held by this object. This may render the object unusable for subsequent operations. Implementations should be sure to call super.destroy().This is intended to only ever be used as a side effect of decreasing the reference count to 0.
- Overrides:
destroy
in classReferenceCountedLivenessReferent
-
run
public final void run() -
updateAndGetAddedIndex
-