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.voidmaybeResetEntries(@NotNull LongUnaryOperator maxSizeForDictId) Resets each registeredDictionaryWriterStatewhosetotalSizeexceeds the limitmaxSizeForDictIdgives for its dictionary id, so the next DictionaryBatch will beisDelta=falsewith a compacted dictionary.voidAdvances the delta boundary for every registered state that currently has a pending delta.
-
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
-
maybeResetEntries
Description copied from interface:DictionaryWriterRegistryResets each registeredDictionaryWriterStatewhosetotalSizeexceeds the limitmaxSizeForDictIdgives for its dictionary id, so the next DictionaryBatch will beisDelta=falsewith a compacted dictionary. This applies to local (viewport/snapshot) registries only; a shared-backed registry ignores this call, as itsSharedWriterDictionaryis reset externally.- Specified by:
maybeResetEntriesin interfaceDictionaryWriterRegistry- Parameters:
maxSizeForDictId- the most values the dictionary with a given id may hold before it is reset; typically no more than the live row count visible to the subscription
-