Class MultiThreadedWriterBase

Direct Known Subclasses:
MultiThreadedUpdater, MultiThreadedWriter

public abstract class MultiThreadedWriterBase extends MultiThreadedAction
Creates multiple threads that write key/values into the
  • Field Details

    • LOG

      private static final org.slf4j.Logger LOG
    • wroteKeys

      A temporary place to keep track of inserted/updated keys. This is written to by all writers and is drained on a separate thread that populates wroteUpToKey, the maximum key in the contiguous range of keys being inserted/updated. This queue is supposed to stay small.
    • nextKeyToWrite

      This is the current key to be inserted/updated by any thread. Each thread does an atomic get and increment operation and inserts the current value.
    • wroteUpToKey

      The highest key in the contiguous range of keys .
    • failedKeySet

      protected Set<Long> failedKeySet
      The sorted set of keys NOT inserted/updated by the writers
    • wroteKeyQueueSize

      The total size of the temporary inserted/updated key set that have not yet lined up in a our contiguous sequence starting from startKey. Supposed to stay small.
    • trackWroteKeys

      protected boolean trackWroteKeys
      Enable this if used in conjunction with a concurrent reader.
  • Constructor Details

  • Method Details