mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
now supports the creating of channels
This commit is contained in:
+12
-8
@@ -40,14 +40,6 @@ public final class WiredChronicleMapStatelessClientBuilder<K, V> implements
|
||||
private byte localIdentifier;
|
||||
private short channelID;
|
||||
|
||||
public WiredStatelessClientTcpConnectionHub hub() {
|
||||
return hub;
|
||||
}
|
||||
|
||||
public void hub(WiredStatelessClientTcpConnectionHub hub) {
|
||||
this.hub = hub;
|
||||
}
|
||||
|
||||
public WiredChronicleMapStatelessClientBuilder(InetSocketAddress remoteAddress, Class keyClass, Class valueClass, short channelID) {
|
||||
this.keyClass = keyClass;
|
||||
this.valueClass = valueClass;
|
||||
@@ -155,4 +147,16 @@ public final class WiredChronicleMapStatelessClientBuilder<K, V> implements
|
||||
public short channelID() {
|
||||
return channelID;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public WiredStatelessClientTcpConnectionHub hub() {
|
||||
return hub;
|
||||
}
|
||||
|
||||
public WiredChronicleMapStatelessClientBuilder<K, V> hub(WiredStatelessClientTcpConnectionHub hub) {
|
||||
this.hub = hub;
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -77,11 +77,13 @@ public class TestWire {
|
||||
((WiredStatelessChronicleMap) statelessMap).createChannel((short) 2);
|
||||
|
||||
|
||||
ChronicleMap<String, String> map2 = new WiredChronicleMapStatelessClientBuilder<String, String>(
|
||||
WiredChronicleMapStatelessClientBuilder localhost = new WiredChronicleMapStatelessClientBuilder<>(
|
||||
new InetSocketAddress("localhost", SERVER_PORT),
|
||||
String.class,
|
||||
String.class,
|
||||
(short) 2).create();
|
||||
(short) 2).hub(builder.hub());
|
||||
|
||||
ChronicleMap<String, String> map2 = localhost.create();
|
||||
|
||||
map2.put("hello", "world");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user