mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Add ChronicleHashBuilder.createOrRecoverPersistedTo(file, sameLibraryVersion) method and emphasize in docs, that the boolean flag in the 'recoverPersistedTo' family of methods couldn't be true, if the version of the library, with which the Chronicle Map persisted to the given file was created, could be different from the present version of the Chronicle Map library
This commit is contained in:
@@ -311,10 +311,18 @@ public final class ChronicleSetBuilder<K>
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChronicleSet<K> recoverPersistedTo(File file, boolean sameBuilderConfig)
|
||||
public ChronicleSet<K> createOrRecoverPersistedTo(File file, boolean sameLibraryVersion)
|
||||
throws IOException {
|
||||
ChronicleMap<K, DummyValue> map =
|
||||
chronicleMapBuilder.recoverPersistedTo(file, sameBuilderConfig);
|
||||
chronicleMapBuilder.createOrRecoverPersistedTo(file, sameLibraryVersion);
|
||||
return new SetFromMap<>((VanillaChronicleMap<K, DummyValue, ?>) map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChronicleSet<K> recoverPersistedTo(File file, boolean sameBuilderConfigAndLibraryVersion)
|
||||
throws IOException {
|
||||
ChronicleMap<K, DummyValue> map =
|
||||
chronicleMapBuilder.recoverPersistedTo(file, sameBuilderConfigAndLibraryVersion);
|
||||
return new SetFromMap<>((VanillaChronicleMap<K, DummyValue, ?>) map);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user