mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
add pre-shutdown action to be executed inside ChronicleHashCloseOnExitHook.
This is useful when we want to do an orderly shutdown. For example: To carry out graceful shutdown and explicitly control when a ChronicleHash is closed, a pre-shutdown action can be a wait on a CountDownLatch that would be released appropriately.
This commit is contained in:
@@ -353,6 +353,11 @@ public final class ChronicleSetBuilder<K>
|
||||
return new SetFromMap<>((VanillaChronicleMap<K, DummyValue, ?>) map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPreShutdownAction(Runnable preShutdownAction) {
|
||||
chronicleMapBuilder.setPreShutdownAction(preShutdownAction);
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated don't use private API in the client code
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user