mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-134 attempting to bias to use IPV4 addresses
This commit is contained in:
@@ -1139,7 +1139,13 @@ class ConcurrentExpiryMap<K extends BytesMarshallable, V extends BytesMarshallab
|
||||
public static InetAddress getDefaultAddress() throws SocketException {
|
||||
NetworkInterface networkInterface = ConcurrentExpiryMap.defaultNetworkInterface();
|
||||
Enumeration<InetAddress> inetAddresses = networkInterface.getInetAddresses();
|
||||
InetAddress inetAddress = inetAddresses.nextElement();
|
||||
|
||||
// we will take the last one as this is likely to be an ipv address which is easier to work with
|
||||
InetAddress inetAddress = null;
|
||||
for (; inetAddresses.hasMoreElements(); ) {
|
||||
inetAddress = inetAddresses.nextElement();
|
||||
}
|
||||
|
||||
|
||||
if (inetAddress == null)
|
||||
throw new IllegalStateException();
|
||||
|
||||
@@ -46,7 +46,7 @@ class ReplicationHubFindByName implements FindByName {
|
||||
public ReplicationHubFindByName(ReplicationHub replicationHub) throws IOException {
|
||||
this.replicationHub = replicationHub;
|
||||
this.map = (Map) of(CharSequence.class, ChronicleMapBuilder.class)
|
||||
.entrySize(300)
|
||||
.entrySize(2500)
|
||||
.entries(128)
|
||||
.instance()
|
||||
.replicatedViaChannel(replicationHub.createChannel((short) MAP_BY_NAME_CHANNEL)).create();
|
||||
|
||||
Reference in New Issue
Block a user