mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
added " public boolean tryReserve()" and some public methods to the build
This commit is contained in:
@@ -250,7 +250,7 @@ public final class ChronicleMapBuilder<K, V> implements
|
||||
* entries are not even landing the map, because compute() always returns null.
|
||||
*/
|
||||
private static void fileLockedIO(
|
||||
File file, FileChannel fileChannel, FileIOAction fileIOAction) throws IOException {
|
||||
File file, FileChannel fileChannel, FileIOAction fileIOAction) {
|
||||
fileLockingControl.compute(file, (k, v) -> {
|
||||
try {
|
||||
try (FileLock ignored = fileChannel.lock()) {
|
||||
@@ -805,7 +805,7 @@ public final class ChronicleMapBuilder<K, V> implements
|
||||
return valueBuilder.constantSize();
|
||||
}
|
||||
|
||||
boolean constantlySizedKeys() {
|
||||
public boolean constantlySizedKeys() {
|
||||
return keyBuilder.constantSizeMarshaller() || sampleKey != null;
|
||||
}
|
||||
|
||||
@@ -891,7 +891,7 @@ public final class ChronicleMapBuilder<K, V> implements
|
||||
return result;
|
||||
}
|
||||
|
||||
boolean constantlySizedValues() {
|
||||
public boolean constantlySizedValues() {
|
||||
return valueBuilder.constantSizeMarshaller() || sampleValue != null;
|
||||
}
|
||||
|
||||
@@ -1881,7 +1881,7 @@ public final class ChronicleMapBuilder<K, V> implements
|
||||
}
|
||||
|
||||
private void establishReplication(
|
||||
VanillaChronicleMap<K, V, ?> map) throws IOException {
|
||||
VanillaChronicleMap<K, V, ?> map) {
|
||||
if (map instanceof ReplicatedChronicleMap) {
|
||||
ReplicatedChronicleMap result = (ReplicatedChronicleMap) map;
|
||||
if (cleanupRemovedEntries)
|
||||
|
||||
@@ -157,6 +157,11 @@ public enum ZeroBytesStore implements BytesStore<ZeroBytesStore, Void> {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean tryReserve() {
|
||||
throw new UnsupportedOperationException("todo");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ZeroBytesStore writeByte(long l, byte b) {
|
||||
throw new UnsupportedOperationException();
|
||||
|
||||
Reference in New Issue
Block a user