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:
@@ -122,6 +122,7 @@ public abstract class VanillaChronicleHash<K,
|
||||
public transient CompactOffHeapLinearHashTable hashLookup;
|
||||
public transient Identity identity;
|
||||
protected int log2TiersInBulk;
|
||||
private Runnable preShutdownAction;
|
||||
/////////////////////////////////////////////////
|
||||
// Bytes Store (essentially, the base address) and serialization-dependent offsets
|
||||
protected transient BytesStore bs;
|
||||
@@ -205,6 +206,8 @@ public abstract class VanillaChronicleHash<K,
|
||||
tierBulkSizeInBytes = computeTierBulkBytesSize(tiersInBulk);
|
||||
|
||||
checksumEntries = privateAPI.checksumEntries();
|
||||
|
||||
preShutdownAction = privateAPI.getPreShutdownAction();
|
||||
}
|
||||
|
||||
public static IOException throwRecoveryOrReturnIOException(
|
||||
@@ -227,6 +230,10 @@ public abstract class VanillaChronicleHash<K,
|
||||
initTransients();
|
||||
}
|
||||
|
||||
public Runnable getPreShutdownAction() {
|
||||
return preShutdownAction;
|
||||
}
|
||||
|
||||
protected void readMarshallableFields(@NotNull WireIn wireIn) {
|
||||
dataFileVersion = wireIn.read(() -> "dataFileVersion").text();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user