public interface ExternalDepot extends TaskGlobalObject
TaskGlobalObject.prepareForTask(int, com.rpl.rama.integration.TaskGlobalContext)
method.Modifier and Type | Method and Description |
---|---|
java.util.concurrent.CompletableFuture<java.lang.Long> |
endOffset(int partitionIndex)
Asynchronously returns the end offset of the given partition index (exclusive).
|
java.util.concurrent.CompletableFuture<java.util.List> |
fetchFrom(int partitionIndex,
long startOffset)
Asynchronously returns a chunk of records starting at the given offset.
|
java.util.concurrent.CompletableFuture<java.util.List> |
fetchFrom(int partitionIndex,
long startOffset,
long endOffset)
Asynchronously returns the sequence of records between the given range of offsets.
|
java.util.concurrent.CompletableFuture<java.lang.Integer> |
getNumPartitions()
Asynchronously returns the number of partitions in the external queue.
|
java.util.concurrent.CompletableFuture<java.lang.Long> |
offsetAfterTimestampMillis(int partitionIndex,
long millis)
Asynchronously returns the first offset of the given partition index after the given timestamp.
|
java.util.concurrent.CompletableFuture<java.lang.Long> |
startOffset(int partitionIndex)
Asynchronously returns the start offset of the given partition index (inclusive).
|
gainedLeadership, prepareForTask
java.util.concurrent.CompletableFuture<java.lang.Integer> getNumPartitions()
java.util.concurrent.CompletableFuture<java.lang.Long> startOffset(int partitionIndex)
java.util.concurrent.CompletableFuture<java.lang.Long> endOffset(int partitionIndex)
java.util.concurrent.CompletableFuture<java.lang.Long> offsetAfterTimestampMillis(int partitionIndex, long millis)
java.util.concurrent.CompletableFuture<java.util.List> fetchFrom(int partitionIndex, long startOffset, long endOffset)
partitionIndex
- Partition to querystartOffset
- Start offset of range (inclusive)endOffset
- End offset of range (exclusive)java.util.concurrent.CompletableFuture<java.util.List> fetchFrom(int partitionIndex, long startOffset)
partitionIndex
- Partition to querystartOffset
- Start offset of range (inclusive)