mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Merge pull request #159 from udaysagar2177/fix2
add pre-shutdown action to be executed inside ChronicleHashCloseOnExitHook
This commit is contained in:
@@ -180,6 +180,7 @@ public final class ChronicleMapBuilder<K, V> implements
|
||||
MapMethods<K, V, ?> methods = DefaultSpi.mapMethods();
|
||||
MapEntryOperations<K, V, ?> entryOperations = mapEntryOperations();
|
||||
MapRemoteOperations<K, V, ?> remoteOperations = mapRemoteOperations();
|
||||
Runnable preShutdownAction;
|
||||
private String name;
|
||||
// not final because of cloning
|
||||
private ChronicleMapBuilderPrivateAPI<K, V> privateAPI =
|
||||
@@ -1589,6 +1590,11 @@ public final class ChronicleMapBuilder<K, V> implements
|
||||
corruptionListener);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setPreShutdownAction(Runnable preShutdownAction) {
|
||||
this.preShutdownAction = preShutdownAction;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChronicleMap<K, V> create() {
|
||||
// clone() to make this builder instance thread-safe, because createWithoutFile() method
|
||||
|
||||
Reference in New Issue
Block a user