Package io.activej.aggregation
Interface AggregationChunkStorage<C>
- All Superinterfaces:
IdGenerator<C>
- All Known Implementing Classes:
ActiveFsChunkStorage
Manages persistence of aggregations (chunks of data).
-
Method Summary
Modifier and TypeMethodDescriptionio.activej.promise.Promise<Void><T> io.activej.promise.Promise<StreamSupplier<T>>read(AggregationStructure aggregation, List<String> fields, Class<T> recordClass, C chunkId, DefiningClassLoader classLoader) Creates aStreamSupplierthat streams records contained in the chunk.<T> io.activej.promise.Promise<StreamConsumer<T>>write(AggregationStructure aggregation, List<String> fields, Class<T> recordClass, C chunkId, DefiningClassLoader classLoader) Creates aStreamConsumerthat persists streamed records.Methods inherited from interface io.activej.ot.util.IdGenerator
createId
-
Method Details
-
read
<T> io.activej.promise.Promise<StreamSupplier<T>> read(AggregationStructure aggregation, List<String> fields, Class<T> recordClass, C chunkId, DefiningClassLoader classLoader) Creates aStreamSupplierthat streams records contained in the chunk. The chunk to read is determined byaggregationIdandid.- Parameters:
recordClass- class of chunk recordchunkId- 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 aStreamConsumerthat persists streamed records. The chunk to write is determined byaggregationIdandid.- Parameters:
fields- fields of chunk recordrecordClass- class of chunk recordchunkId- id of chunk
-
finish
-