added " public boolean tryReserve()" and some public methods to the build

This commit is contained in:
Rob Austin
2018-09-06 19:10:02 +01:00
parent 7a9e6e48c0
commit 914f27b588
2 changed files with 9 additions and 4 deletions
@@ -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();