Class TrackingWritableRowSetImpl
- All Implemented Interfaces:
LogOutputAppendable,RowSequence,RowSet,TrackingRowSet,TrackingWritableRowSet,WritableRowSet,LongSizedDataStructure,SafeCloseable,Externalizable,Serializable,AutoCloseable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.engine.rowset.RowSequence
RowSequence.IteratorNested classes/interfaces inherited from interface io.deephaven.engine.rowset.RowSet
RowSet.Evaluator<T extends Comparable<T>>, RowSet.Iterator, RowSet.RangeIterator, RowSet.SearchIterator, RowSet.TargetComparatorNested classes/interfaces inherited from interface io.deephaven.engine.rowset.TrackingRowSet
TrackingRowSet.Indexer -
Field Summary
Fields inherited from interface io.deephaven.engine.rowset.RowSequence
NULL_ROW_KEYFields inherited from interface io.deephaven.engine.rowset.RowSet
EMPTY_ITERATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Free any resources associated with this object.copyPrev()Get a copy of the value of this TrackingRowSet as of the end of the previous update graph cycle.longfindPrev(long rowKey) Returns the position in[0..(size-1)]where the row key is found in the previous value of this.longSame asfirstRowKey(), as of the end of the previous update graph cycle.longgetPrev(long rowPosition) Same asget(rowPosition), as of the end of the previous update graph cycle.<INDEXER_TYPE extends TrackingRowSet.Indexer>
INDEXER_TYPEindexer()Get an opaqueTrackingRowSet.Indexerobject previously associated with this TrackingRowSet.<INDEXER_TYPE extends TrackingRowSet.Indexer>
INDEXER_TYPEindexer(@NotNull Function<TrackingRowSet, INDEXER_TYPE> indexerFactory) Get an opaqueTrackingRowSet.Indexerobject previously associated with this TrackingRowSet, or set and get one created withindexerFactoryif this is the first invocation.voidInitializes our previous value from the current value.longSame aslastRowKey(), as of the end of the previous update graph cycle.protected voidprev()Access the read-only value of this TrackingRowSet as of the end of the previous update graph cycle.voidreadExternal(@NotNull ObjectInput in) longsizePrev()Get the size of this TrackingRowSet as of the end of the previous update graph cycle.Destructively convert this WritableRowSet into aTrackingWritableRowSet.Methods inherited from class io.deephaven.engine.rowset.impl.WritableRowSetImpl
addToBuilderFromImpl, append, asRowSet, clear, compact, containsRange, copy, equals, fillRowKeyChunk, fillRowKeyRangesChunk, find, firstRowKey, forEachRowKey, forEachRowKeyRange, get, getAverageRunLengthEstimate, getInnerSet, getInnerSet, getKeysForPositions, getRowSequenceByKeyRange, getRowSequenceByPosition, getRowSequenceIterator, insert, insert, insert, insertRange, insertWithShift, intersect, invert, isEmpty, iterator, lastRowKey, minus, overlaps, overlapsRange, postMutationHook, rangeIterator, rangesCountUpperBound, remove, remove, remove, removeRange, resetTo, retain, retainRange, reverseIterator, searchIterator, shift, shiftInPlace, size, subSetByKeyRange, subSetByPositionRange, subSetForPositions, subSetForPositions, subSetForReversePositions, subsetOf, toString, toString, union, update, validate, writeExternal, writeImplMethods inherited from class io.deephaven.engine.rowset.impl.RowSequenceAsChunkImpl
asRowKeyChunk, asRowKeyRangesChunk, closeRowSequenceAsChunkImpl, invalidateRowSequenceAsChunkImpl, runsUpperBoundMethods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.deephaven.base.log.LogOutputAppendable
appendMethods inherited from interface io.deephaven.util.datastructures.LongSizedDataStructure
intSize, intSizeMethods inherited from interface io.deephaven.engine.rowset.RowSequence
asRowKeyChunk, asRowKeyRangesChunk, asRowSet, fillRowKeyChunk, fillRowKeyRangesChunk, forAllRowKeyRanges, forEachRowKeyRange, getAverageRunLengthEstimate, getRowSequenceByKeyRange, getRowSequenceByPosition, getRowSequenceIterator, isContiguousMethods inherited from interface io.deephaven.engine.rowset.RowSet
containsRange, copy, find, firstRowKey, forAllRowKeys, forEachRowKey, get, getKeysForPositions, intersect, invert, invert, isEmpty, isFlat, isNonempty, isTracking, isWritable, iterator, lastRowKey, minus, overlaps, overlapsRange, rangeIterator, reverseIterator, searchIterator, shift, size, subSetByKeyRange, subSetByPositionRange, subSetForPositions, subSetForPositions, subSetForReversePositions, subsetOf, toRowKeyArray, toRowKeyArray, union, validate, validateMethods inherited from interface io.deephaven.engine.rowset.TrackingRowSet
intSizePrev, writableCastMethods inherited from interface io.deephaven.engine.rowset.WritableRowSet
clear, compact, extract, insert, insert, insert, insertRange, insertWithShift, remove, remove, remove, removeRange, resetTo, retain, retainRange, shiftInPlace, trackingCast, update
-
Constructor Details
-
TrackingWritableRowSetImpl
public TrackingWritableRowSetImpl() -
TrackingWritableRowSetImpl
-
-
Method Details
-
indexer
public <INDEXER_TYPE extends TrackingRowSet.Indexer> INDEXER_TYPE indexer(@NotNull @NotNull Function<TrackingRowSet, INDEXER_TYPE> indexerFactory) Description copied from interface:TrackingRowSetGet an opaqueTrackingRowSet.Indexerobject previously associated with this TrackingRowSet, or set and get one created withindexerFactoryif this is the first invocation.- Specified by:
indexerin interfaceTrackingRowSet- Parameters:
indexerFactory- The indexer factory to be used if no indexer has been set previously- Returns:
- An opaque indexer object associated with this TrackingRowSet
-
indexer
Description copied from interface:TrackingRowSetGet an opaqueTrackingRowSet.Indexerobject previously associated with this TrackingRowSet.- Specified by:
indexerin interfaceTrackingRowSet- Returns:
- An opaque indexer object associated with this TrackingRowSet, or
nullif none has been set
-
preMutationHook
protected void preMutationHook()- Overrides:
preMutationHookin classWritableRowSetImpl
-
toTracking
Description copied from interface:WritableRowSetDestructively convert this WritableRowSet into a
TrackingWritableRowSet.This is really only suitable when the caller "owns" this WritableRowSet. Programming errors may occur if the any code holds onto references to
thisrather than the result, because there may be ambiguity about resource ownership.Implementations are free to transfer ownership of resources from this object to the result. As such, it is an error to directly use this object afterwards; callers must instead use the returned result.
It is an error to invoke this on an instance that is already tracking.
- Specified by:
toTrackingin interfaceWritableRowSet- Overrides:
toTrackingin classWritableRowSetImpl- Returns:
- A
TrackingWritableRowSetconstructed from this WritableRowSet, orthisif already tracking
-
close
public void close()Description copied from interface:RowSequenceFree any resources associated with this object.
Using any
RowSequencemethods afterclose()is an error and may produce exceptions or undefined results.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceRowSequence- Specified by:
closein interfaceRowSet- Specified by:
closein interfaceSafeCloseable- Overrides:
closein classWritableRowSetImpl
-
initializePreviousValue
public void initializePreviousValue()Description copied from interface:TrackingWritableRowSetInitializes our previous value from the current value.This call is used by operations that manipulate a TrackingWritableRowSet while constructing it, but need to set the state at the end of the initial operation to the current state.
Calling this in other circumstances will yield undefined results.
- Specified by:
initializePreviousValuein interfaceTrackingWritableRowSet
-
sizePrev
public long sizePrev()Description copied from interface:TrackingRowSetGet the size of this TrackingRowSet as of the end of the previous update graph cycle.- Specified by:
sizePrevin interfaceTrackingRowSet- Returns:
- The previous size
-
copyPrev
Description copied from interface:TrackingRowSetGet a copy of the value of this TrackingRowSet as of the end of the previous update graph cycle. As in other operations that return aWritableRowSet, the result must beclosedby the caller when it is no longer needed. The result will never be aTrackingRowSet; useWritableRowSet.toTracking()on the result as needed.- Specified by:
copyPrevin interfaceTrackingRowSet- Returns:
- A copy of the previous value
-
prev
Description copied from interface:TrackingRowSetAccess the read-only value of this TrackingRowSet as of the end of the previous update graph cycle. The returnedRowSetmust not be mutated orclosed; it belongs to this TrackingRowSet. Callers should be sure to only use the result during the updating phase of a cycle, and never across logical clock phases/steps.- Specified by:
previn interfaceTrackingRowSet- Returns:
- A read-only view of the previous value, owned by this TrackingRowSet
-
getPrev
public long getPrev(long rowPosition) Description copied from interface:TrackingRowSetSame asget(rowPosition), as of the end of the previous update graph cycle.- Specified by:
getPrevin interfaceTrackingRowSet- Parameters:
rowPosition- A row position in this RowSet between0andsizePrev() - 1.- Returns:
- The row key previously at the supplied row position
-
findPrev
public long findPrev(long rowKey) Description copied from interface:TrackingRowSetReturns the position in[0..(size-1)]where the row key is found in the previous value of this. If not found, then return(-(position it would be) - 1), as in Array.binarySearch.- Specified by:
findPrevin interfaceTrackingRowSet- Parameters:
rowKey- The row key to search for- Returns:
- A position from
[0..(size-1)]if the row key was found. If the row key was not found, then(-position - 1)as in Array.binarySearch
-
firstRowKeyPrev
public long firstRowKeyPrev()Description copied from interface:TrackingRowSetSame asfirstRowKey(), as of the end of the previous update graph cycle.- Specified by:
firstRowKeyPrevin interfaceTrackingRowSet- Returns:
- The previous first row key
-
lastRowKeyPrev
public long lastRowKeyPrev()Description copied from interface:TrackingRowSetSame aslastRowKey(), as of the end of the previous update graph cycle.- Specified by:
lastRowKeyPrevin interfaceTrackingRowSet- Returns:
- The previous last row key
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classWritableRowSetImpl- Throws:
IOException
-