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:
udaysagar2177
2018-09-21 00:36:04 -07:00
parent ccb6577c3d
commit 9eed0e3265
9 changed files with 105 additions and 11 deletions
@@ -116,4 +116,9 @@ class ChronicleMapBuilderPrivateAPI<K, V>
public void remoteOperations(MapRemoteOperations<K, V, ?> remoteOperations) {
b.remoteOperations(remoteOperations);
}
@Override
public Runnable getPreShutdownAction() {
return b.preShutdownAction;
}
}