Class SharedWriterDictionary

java.lang.Object
io.deephaven.extensions.barrage.chunk.SharedWriterDictionary

public final class SharedWriterDictionary extends Object
Shared per-table dictionary state for full subscriptions. Holds the authoritative value-to-index mapping and the ordered list of all values ever added. Multiple SharedDictionaryWriterState instances (one per active full subscriber) delegate their index lookups here, so all full subscribers observe the same index assignments.

The value list grows monotonically and is never compacted here. Each per-subscriber wrapper tracks an independent flushedOffset into this list so it knows which values have already been sent to that subscriber.

Thread-safety: not thread-safe; access is serialized by the barrage propagation thread (the UGP cycle).

  • Constructor Details

    • SharedWriterDictionary

      public SharedWriterDictionary(long dictId, ChunkType valuesChunkType)
  • Method Details

    • getDictId

      public long getDictId()
    • getTotalSize

      public int getTotalSize()
      Total number of distinct values currently in the dictionary (reset to 0 after reset()).
    • getGeneration

      public int getGeneration()
      Returns the current generation counter. Increments each time reset() is called.
    • reset

      public void reset()
      Discards all accumulated values and increments the generation counter. SharedDictionaryWriterState instances that reference this shared dictionary will detect the reset on their next query and re-emit an isDelta=false DictionaryBatch.