Use ChronicleMapBuilder to build all ChronicleMap

This commit is contained in:
Peter Lawrey
2015-01-15 17:35:44 +00:00
parent a7b3f03fe2
commit 8a4ad9ade2
9 changed files with 38 additions and 31 deletions
@@ -18,7 +18,10 @@
package net.openhft.chronicle.map;
import net.openhft.chronicle.hash.*;
import net.openhft.chronicle.hash.ChronicleHashBuilder;
import net.openhft.chronicle.hash.ChronicleHashErrorListener;
import net.openhft.chronicle.hash.ChronicleHashErrorListeners;
import net.openhft.chronicle.hash.ChronicleHashInstanceBuilder;
import net.openhft.chronicle.hash.replication.*;
import net.openhft.chronicle.hash.serialization.*;
import net.openhft.chronicle.hash.serialization.internal.MetaBytesInterop;
@@ -188,6 +191,11 @@ public final class ChronicleMapBuilder<K, V> implements Cloneable,
return new ChronicleMapBuilder<>(keyClass, valueClass);
}
public static <K, V> ChronicleMapStatelessClientBuilder<K, V> of(
@NotNull Class<K> keyClass, @NotNull Class<V> valueClass, InetSocketAddress socketAddress) {
return ChronicleMapStatelessClientBuilder.of(socketAddress);
}
private static long roundUpMapHeaderSize(long headerSize) {
long roundUp = (headerSize + 127L) & ~127L;
if (roundUp - headerSize < 64)