HCOLL-134 reduced the number of entries as this is causing a memory issue on my laptop

This commit is contained in:
Rob Austin
2014-11-18 11:54:09 +00:00
parent 20d077b344
commit baa966ca2d
3 changed files with 9 additions and 8 deletions
@@ -106,7 +106,7 @@ public class NodeDiscovery {
}
public synchronized FindFindByName mapByName() throws
public synchronized ReplicationHubFindByName mapByName() throws
IOException, InterruptedException {
final AtomicInteger ourProposedIdentifier = new AtomicInteger();
@@ -255,7 +255,7 @@ public class NodeDiscovery {
.tcpTransportAndNetwork(tcpConfig)
.createWithId(identifier);
return new FindFindByName(replicationHub);
return new ReplicationHubFindByName(replicationHub);
}
@@ -31,7 +31,7 @@ import static net.openhft.chronicle.map.ChronicleMapBuilder.of;
/**
* @author Rob Austin.
*/
class FindFindByName implements FindByName {
class ReplicationHubFindByName implements FindByName {
public static final int MAP_BY_NAME_CHANNEL = 1;
private final ReplicationHub replicationHub;
@@ -43,10 +43,11 @@ class FindFindByName implements FindByName {
/**
* @throws IOException
*/
public FindFindByName(ReplicationHub replicationHub) throws IOException {
public ReplicationHubFindByName(ReplicationHub replicationHub) throws IOException {
this.replicationHub = replicationHub;
this.map = (Map) of(CharSequence.class, ChronicleMapBuilder.class)
.entrySize(300)
.entries(128)
.instance()
.replicatedViaChannel(replicationHub.createChannel((short) MAP_BY_NAME_CHANNEL)).create();
}