Interface ShutdownCondition
public interface ShutdownCondition
Represents a condition that may block shutdown until it is resolved.
Implementations define what "in progress" means (e.g. a cache rehash), and receive callbacks when the condition is
resolved (complete()) or when the shutdown timeout expires (onTimeout()).
-
Method Summary
Modifier and TypeMethodDescriptionvoidcomplete()Invoked when the condition is no longer in progress and shutdown can proceed, including when the condition was not in progress at the time of shutdown.booleanvoidInvoked when the shutdown timeout expires while the condition is still in progress.
-
Method Details
-
inProgress
boolean inProgress()- Returns:
trueif the operation is still in progress and shutdown should wait.
-
onTimeout
void onTimeout()Invoked when the shutdown timeout expires while the condition is still in progress. -
complete
void complete()Invoked when the condition is no longer in progress and shutdown can proceed, including when the condition was not in progress at the time of shutdown.
-