Interface AggregationChunkStorage<C>

All Superinterfaces:
IdGenerator<C>
All Known Implementing Classes:
ActiveFsChunkStorage

public interface AggregationChunkStorage<C> extends IdGenerator<C>
Manages persistence of aggregations (chunks of data).
  • Method Details

    • read

      <T> io.activej.promise.Promise<StreamSupplier<T>> read(AggregationStructure aggregation, List<String> fields, Class<T> recordClass, C chunkId, DefiningClassLoader classLoader)
      Creates a StreamSupplier that streams records contained in the chunk. The chunk to read is determined by aggregationId and id.
      Parameters:
      recordClass - class of chunk record
      chunkId - id of chunk
      Returns:
      StreamSupplier, which will stream read records to its wired consumer.
    • write

      <T> io.activej.promise.Promise<StreamConsumer<T>> write(AggregationStructure aggregation, List<String> fields, Class<T> recordClass, C chunkId, DefiningClassLoader classLoader)
      Creates a StreamConsumer that persists streamed records. The chunk to write is determined by aggregationId and id.
      Parameters:
      fields - fields of chunk record
      recordClass - class of chunk record
      chunkId - id of chunk
    • finish

      io.activej.promise.Promise<Void> finish(Set<C> chunkIds)