Class WebDictionaryWriterRegistryImpl
java.lang.Object
io.deephaven.web.client.api.barrage.WebDictionaryWriterRegistryImpl
- All Implemented Interfaces:
DictionaryWriterRegistry
public final class WebDictionaryWriterRegistryImpl
extends Object
implements DictionaryWriterRegistry
The JS API's
DictionaryWriterRegistry. The JS API does not yet write dictionary-encoded columns, so this
registry never has any entries; the server implementation is backed by fastutil maps that are not available under
GWT.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.extensions.barrage.chunk.DictionaryWriterRegistry
DictionaryWriterRegistry.Entry -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull Collection<DictionaryWriterRegistry.Entry> entries()Returns all registered entries.@NotNull DictionaryWriterStategetOrCreate(long dictId, @NotNull ChunkWriter<Chunk<Values>> valuesWriter, @NotNull ChunkType valuesChunkType) Returns (or creates) theDictionaryWriterStatefor the given dictionary id.booleanReturnstrueif any registered dictionary has a pending delta that needs a DictionaryBatch message.voidAdvances the delta boundary for every registered state that currently has a pending delta.voidresetOverflowedEntries(long liveRowCount) Checks each registeredDictionaryWriterStatefor overflow: if itstotalSizeexceedsliveRowCount, callsDictionaryWriterState.reset()so the next DictionaryBatch will beisDelta=falsewith a compacted dictionary.
-
Constructor Details
-
WebDictionaryWriterRegistryImpl
public WebDictionaryWriterRegistryImpl()
-
-
Method Details
-
getOrCreate
@NotNull public @NotNull DictionaryWriterState getOrCreate(long dictId, @NotNull @NotNull ChunkWriter<Chunk<Values>> valuesWriter, @NotNull @NotNull ChunkType valuesChunkType) Description copied from interface:DictionaryWriterRegistryReturns (or creates) theDictionaryWriterStatefor the given dictionary id.The first call for a given
dictIdregisters thevaluesWriterfor that id and creates the appropriate state type. Subsequent calls for the same id return the existing state.- Specified by:
getOrCreatein interfaceDictionaryWriterRegistry
-
entries
Description copied from interface:DictionaryWriterRegistryReturns all registered entries.- Specified by:
entriesin interfaceDictionaryWriterRegistry
-
hasAnyDelta
public boolean hasAnyDelta()Description copied from interface:DictionaryWriterRegistryReturnstrueif any registered dictionary has a pending delta that needs a DictionaryBatch message.- Specified by:
hasAnyDeltain interfaceDictionaryWriterRegistry
-
resetDeltas
public void resetDeltas()Description copied from interface:DictionaryWriterRegistryAdvances the delta boundary for every registered state that currently has a pending delta.- Specified by:
resetDeltasin interfaceDictionaryWriterRegistry
-
resetOverflowedEntries
public void resetOverflowedEntries(long liveRowCount) Description copied from interface:DictionaryWriterRegistryChecks each registeredDictionaryWriterStatefor overflow: if itstotalSizeexceedsliveRowCount, callsDictionaryWriterState.reset()so the next DictionaryBatch will beisDelta=falsewith a compacted dictionary. Only call this for local (viewport/snapshot) registries; for shared-backed registries theSharedWriterDictionaryis reset externally.- Specified by:
resetOverflowedEntriesin interfaceDictionaryWriterRegistry- Parameters:
liveRowCount- the current number of live rows visible to this subscription
-