Interface DrainingCloseable
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Subinterfaces:
JStreamParallelStreamProcessor<K,,V> ParallelConsumer<K,,V> ParallelStreamProcessor<K,V>
- All Known Implementing Classes:
AbstractParallelEoSStreamProcessor,ExternalEngine,JStreamParallelEoSStreamProcessor,ParallelEoSStreamProcessor
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()Close the consumer, without draining.voidclose(Duration timeout, DrainingCloseable.DrainingMode drainingMode) Close the consumer.default voiddefault voidcloseDontDrainFirst(Duration timeout) default voiddefault voidcloseDrainFirst(Duration timeout) longOf the records consumed from the broker, how many do we have remaining in our local queues
-
Field Details
-
DEFAULT_TIMEOUT
-
-
Method Details
-
close
default void close()Close the consumer, without draining. Uses a reasonable default timeout.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- See Also:
-
closeDrainFirst
default void closeDrainFirst()- See Also:
-
closeDontDrainFirst
default void closeDontDrainFirst() -
closeDrainFirst
- See Also:
-
closeDontDrainFirst
-
close
Close the consumer.- Parameters:
timeout- how long to wait before giving updrainingMode- wait for messages already consumed from the broker to be processed before closing
-
workRemaining
long workRemaining()Of the records consumed from the broker, how many do we have remaining in our local queues- Returns:
- the number of consumed but outstanding records to process
-