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();
}
@@ -31,7 +31,7 @@ import java.io.IOException;
public class MapByNameTest {
private FindFindByName findMapByName;
private ReplicationHubFindByName findMapByName;
@Before
public void setUp() throws IOException {
@@ -40,7 +40,7 @@ public class MapByNameTest {
.tcpTransportAndNetwork(TcpTransportAndNetworkConfig.of(8243))
.createWithId((byte) 1);
findMapByName = new FindFindByName(replicationHub);
findMapByName = new ReplicationHubFindByName(replicationHub);
}
@Test
@@ -80,7 +80,7 @@ public class MapByNameTest {
.name("myMap")
.removeReturnsNull(true);
FindFindByName mapByName = nodeDiscovery.mapByName();
ReplicationHubFindByName mapByName = nodeDiscovery.mapByName();
mapByName.add(builder);
ChronicleMap<Object, Object> myMap2 = mapByName.create("myMap");
@@ -97,7 +97,7 @@ public class MapByNameTest {
.removeReturnsNull(true);
FindFindByName mapByName = nodeDiscovery.mapByName();
ReplicationHubFindByName mapByName = nodeDiscovery.mapByName();
mapByName.add(builder);