future = executor.submit(this);
}
+ public Optional<Long> getOffset(Integer partition)
+ {
+ return Optional.ofNullable(offsets.get(partition));
+ }
+
public synchronized void stop() throws ExecutionException, InterruptedException
{
boolean stateChanged = running.compareAndSet(true, false);