mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-134 reduced the number of entries as this is causing a memory issue on my laptop
This commit is contained in:
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -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);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user