Class SerializedStorage<T>

java.lang.Object
org.apache.druid.query.aggregation.SerializedStorage<T>
Type Parameters:
T -

public class SerializedStorage<T> extends Object
simple utility class useful for when multiple passes of input are needed for encoding (e.g. delta or dictionary encoding).

This allows objects to be serialized to some temporary storage and iterated over for final processing.

  • Constructor Details

  • Method Details

    • store

      public void store(@Nullable T value) throws IOException
      Throws:
      IOException
    • numStored

      public int numStored()
    • iterator

      public IOIterator<T> iterator() throws IOException
      Generates an iterator over everything that has been stored. Also signifies the end of storing objects. iterator() can be called multiple times if needed, but after iterator() is called, store() can no longer be called.
      Returns:
      an iterator
      Throws:
      IOException - on failure