diff --git a/src/main/java/net/openhft/chronicle/map/ChannelProvider.java b/src/main/java/net/openhft/chronicle/hash/ChannelProvider.java similarity index 99% rename from src/main/java/net/openhft/chronicle/map/ChannelProvider.java rename to src/main/java/net/openhft/chronicle/hash/ChannelProvider.java index 1ea1b2e8b..3f4334939 100644 --- a/src/main/java/net/openhft/chronicle/map/ChannelProvider.java +++ b/src/main/java/net/openhft/chronicle/hash/ChannelProvider.java @@ -16,9 +16,10 @@ * limitations under the License. */ -package net.openhft.chronicle.map; +package net.openhft.chronicle.hash; +import net.openhft.chronicle.map.*; import net.openhft.lang.collection.DirectBitSet; import net.openhft.lang.collection.SingleThreadedDirectBitSet; import net.openhft.lang.io.ByteBufferBytes; @@ -411,7 +412,7 @@ public final class ChannelProvider implements Closeable { @Override protected Closeable applyTo(AbstractChronicleMapBuilder builder, Replica map, EntryExternalizable entryExternalizable, - final VanillaChronicleMap chronicleMap) { + final ChronicleMap chronicleMap) { if (builder.entrySize() > maxEntrySize) { throw new IllegalArgumentException("During ReplicatingChannelBuilder setup, " + "maxEntrySize=" + maxEntrySize + " was specified, but map with " + @@ -429,5 +430,6 @@ public final class ChannelProvider implements Closeable { chronicleChannels[chronicleChannel] = null; channelEntryExternalizables[chronicleChannel] = null; } + } } \ No newline at end of file diff --git a/src/main/java/net/openhft/chronicle/map/ChannelProviderBuilder.java b/src/main/java/net/openhft/chronicle/hash/ChannelProviderBuilder.java similarity index 95% rename from src/main/java/net/openhft/chronicle/map/ChannelProviderBuilder.java rename to src/main/java/net/openhft/chronicle/hash/ChannelProviderBuilder.java index c002db915..d9a26b346 100644 --- a/src/main/java/net/openhft/chronicle/map/ChannelProviderBuilder.java +++ b/src/main/java/net/openhft/chronicle/hash/ChannelProviderBuilder.java @@ -16,7 +16,10 @@ * limitations under the License. */ -package net.openhft.chronicle.map; +package net.openhft.chronicle.hash; + +import net.openhft.chronicle.map.TcpReplicator; +import net.openhft.chronicle.map.UdpReplicator; import java.io.IOException; diff --git a/src/main/java/net/openhft/chronicle/map/ReplicationConfig.java b/src/main/java/net/openhft/chronicle/hash/ReplicationConfig.java similarity index 95% rename from src/main/java/net/openhft/chronicle/map/ReplicationConfig.java rename to src/main/java/net/openhft/chronicle/hash/ReplicationConfig.java index 1547343c4..edb7e9269 100644 --- a/src/main/java/net/openhft/chronicle/map/ReplicationConfig.java +++ b/src/main/java/net/openhft/chronicle/hash/ReplicationConfig.java @@ -16,7 +16,7 @@ * limitations under the License. */ -package net.openhft.chronicle.map; +package net.openhft.chronicle.hash; /** * @author Rob Austin. diff --git a/src/main/java/net/openhft/chronicle/map/TcpReplicationConfig.java b/src/main/java/net/openhft/chronicle/hash/TcpReplicationConfig.java similarity index 97% rename from src/main/java/net/openhft/chronicle/map/TcpReplicationConfig.java rename to src/main/java/net/openhft/chronicle/hash/TcpReplicationConfig.java index 9e6039500..1f9309992 100644 --- a/src/main/java/net/openhft/chronicle/map/TcpReplicationConfig.java +++ b/src/main/java/net/openhft/chronicle/hash/TcpReplicationConfig.java @@ -16,8 +16,10 @@ * limitations under the License. */ -package net.openhft.chronicle.map; +package net.openhft.chronicle.hash; +import net.openhft.chronicle.map.IdentifierListener; +import net.openhft.chronicle.map.ThrottlingConfig; import org.jetbrains.annotations.NotNull; import java.net.InetSocketAddress; @@ -70,7 +72,7 @@ public class TcpReplicationConfig implements ReplicationConfig { return this; } - public ThrottlingConfig throttlingConfig() { + public ThrottlingConfig throttlingConfig() { return throttlingConfig; } diff --git a/src/main/java/net/openhft/chronicle/map/UdpReplicationConfigBean.java b/src/main/java/net/openhft/chronicle/hash/UdpReplicationConfig.java similarity index 61% rename from src/main/java/net/openhft/chronicle/map/UdpReplicationConfigBean.java rename to src/main/java/net/openhft/chronicle/hash/UdpReplicationConfig.java index 2b61ed402..cb1892b5c 100644 --- a/src/main/java/net/openhft/chronicle/map/UdpReplicationConfigBean.java +++ b/src/main/java/net/openhft/chronicle/hash/UdpReplicationConfig.java @@ -16,12 +16,64 @@ * limitations under the License. */ -package net.openhft.chronicle.map; +package net.openhft.chronicle.hash; + +import net.openhft.chronicle.map.ThrottlingConfig; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import java.net.InetAddress; import java.net.NetworkInterface; +public abstract class UdpReplicationConfig implements ReplicationConfig { + + /** + * Package-private constructor forbids subclassing from outside of the package + */ + UdpReplicationConfig() { + // nothing to do + } + + public static UdpReplicationConfig simple(@NotNull InetAddress address, int port) { + if (address.isMulticastAddress()) + throw new IllegalArgumentException(); + + + return create(address, port, null, ThrottlingConfig.noThrottling()); + } + + public static UdpReplicationConfig multiCast(@NotNull InetAddress address, int port, + @NotNull NetworkInterface networkInterface) { + if (!address.isMulticastAddress() || networkInterface == null) + throw new IllegalArgumentException(); + return create(address, port, networkInterface, ThrottlingConfig.noThrottling()); + } + + static UdpReplicationConfig create(InetAddress address, int port, + NetworkInterface networkInterface, + ThrottlingConfig throttlingConfig) { + return new UdpReplicationConfigBean(address, port, networkInterface, + throttlingConfig); + } + + public abstract InetAddress address(); + + public abstract int port(); + + @Nullable + public abstract NetworkInterface networkInterface(); + + public abstract ThrottlingConfig throttlingConfig(); + + public UdpReplicationConfig throttlingConfig(ThrottlingConfig throttlingConfig) { + ThrottlingConfig.checkMillisecondBucketInterval(throttlingConfig, "UDP"); + return create(address(), port(), networkInterface(), throttlingConfig); + } +} + + + final class UdpReplicationConfigBean extends UdpReplicationConfig { private final InetAddress address; private final int port; diff --git a/src/main/java/net/openhft/chronicle/map/AbstractChannelReplicator.java b/src/main/java/net/openhft/chronicle/map/AbstractChannelReplicator.java index f0d541071..c0796778d 100644 --- a/src/main/java/net/openhft/chronicle/map/AbstractChannelReplicator.java +++ b/src/main/java/net/openhft/chronicle/map/AbstractChannelReplicator.java @@ -42,7 +42,7 @@ import static java.util.concurrent.TimeUnit.MILLISECONDS; /** * @author Rob Austin. */ -abstract class AbstractChannelReplicator implements Closeable { +public abstract class AbstractChannelReplicator implements Closeable { public static final int BITS_IN_A_BYTE = 8; diff --git a/src/main/java/net/openhft/chronicle/map/AbstractChronicleMapBuilder.java b/src/main/java/net/openhft/chronicle/map/AbstractChronicleMapBuilder.java index 318302c33..2ddec5f8a 100644 --- a/src/main/java/net/openhft/chronicle/map/AbstractChronicleMapBuilder.java +++ b/src/main/java/net/openhft/chronicle/map/AbstractChronicleMapBuilder.java @@ -272,7 +272,7 @@ public abstract class AbstractChronicleMapBuilder 0) return entryAndValueAlignment().alignSize(entrySize); int size = metaDataBytes; diff --git a/src/main/java/net/openhft/chronicle/map/NodeDiscovery.java b/src/main/java/net/openhft/chronicle/map/NodeDiscovery.java index b91a7e482..16bb25b95 100644 --- a/src/main/java/net/openhft/chronicle/map/NodeDiscovery.java +++ b/src/main/java/net/openhft/chronicle/map/NodeDiscovery.java @@ -18,6 +18,8 @@ package net.openhft.chronicle.map; +import net.openhft.chronicle.hash.TcpReplicationConfig; +import net.openhft.chronicle.hash.UdpReplicationConfig; import net.openhft.lang.collection.ATSDirectBitSet; import net.openhft.lang.collection.DirectBitSet; import net.openhft.lang.io.ByteBufferBytes; @@ -39,11 +41,11 @@ import java.util.concurrent.atomic.AtomicReference; import static java.nio.ByteBuffer.allocateDirect; import static java.util.concurrent.TimeUnit.SECONDS; +import static net.openhft.chronicle.hash.UdpReplicationConfig.simple; import static net.openhft.chronicle.map.ConcurrentExpiryMap.getDefaultAddress; import static net.openhft.chronicle.map.DiscoveryNodeBytesMarshallable.ProposedNodes; import static net.openhft.chronicle.map.NodeDiscoveryBroadcaster.BOOTSTRAP_BYTES; import static net.openhft.chronicle.map.NodeDiscoveryBroadcaster.LOG; -import static net.openhft.chronicle.map.UdpReplicationConfig.simple; /** * @author Rob Austin. @@ -259,7 +261,7 @@ public class NodeDiscovery { * bitwise OR's the two bit sets or put another way, merges the source bitset into the * destination bitset and returns the destination * - * @param source to or + * @param source to or * @param destination to or * @return result. */ @@ -357,7 +359,7 @@ class NodeDiscoveryBroadcaster extends UdpChannelReplicator { * @throws java.io.IOException */ NodeDiscoveryBroadcaster( - @NotNull final UdpReplicationConfig replicationConfig, + final UdpReplicationConfig replicationConfig, final int serializedEntrySize, final BytesMarshallable externalizable) throws IOException { diff --git a/src/main/java/net/openhft/chronicle/map/Replicator.java b/src/main/java/net/openhft/chronicle/map/Replicator.java index c4dbdb77a..7d84ae262 100644 --- a/src/main/java/net/openhft/chronicle/map/Replicator.java +++ b/src/main/java/net/openhft/chronicle/map/Replicator.java @@ -19,7 +19,7 @@ package net.openhft.chronicle.map; import java.io.Closeable; import java.io.IOException; -abstract class Replicator { +public abstract class Replicator { /** * A constructor for use in subclasses. @@ -29,8 +29,8 @@ abstract class Replicator { /** * Applies the replicator to the map instance and returns a Closeable token to manage resources, - * associated with the replication.

This method isn't intended to be called from the - * client code. + * associated with the replication.

This method isn't intended to be called from the client + * code. * * @param builder the builder from which the map was constructed. The replicator may * obtain some map configurations, not accessible via the map @@ -49,6 +49,5 @@ abstract class Replicator { */ protected abstract Closeable applyTo(AbstractChronicleMapBuilder builder, Replica map, Replica.EntryExternalizable entryExternalizable, - final VanillaChronicleMap chronicleMap) - throws IOException; + final ChronicleMap chronicleMap) throws IOException; } diff --git a/src/main/java/net/openhft/chronicle/map/Replicators.java b/src/main/java/net/openhft/chronicle/map/Replicators.java index fbe852d6f..6b97d0ee6 100644 --- a/src/main/java/net/openhft/chronicle/map/Replicators.java +++ b/src/main/java/net/openhft/chronicle/map/Replicators.java @@ -16,6 +16,10 @@ package net.openhft.chronicle.map; +import net.openhft.chronicle.hash.TcpReplicationConfig; +import net.openhft.chronicle.hash.UdpReplicationConfig; +import org.jetbrains.annotations.NotNull; + import java.io.Closeable; import java.io.IOException; @@ -28,15 +32,17 @@ final class Replicators { return new Replicator() { @Override - protected Closeable applyTo(AbstractChronicleMapBuilder builder, - Replica replica, Replica.EntryExternalizable entryExternalizable, - final VanillaChronicleMap chronicleMap) throws IOException { + protected Closeable applyTo(@NotNull final AbstractChronicleMapBuilder builder, + @NotNull final Replica replica, + @NotNull final Replica.EntryExternalizable entryExternalizable, + final ChronicleMap chronicleMap) + throws IOException { final KeyValueSerializer keyValueSerializer = new KeyValueSerializer(builder .keyBuilder, builder.valueBuilder); StatelessServerConnector statelessServer = new StatelessServerConnector - (keyValueSerializer, chronicleMap, builder.entrySize()); + (keyValueSerializer, (VanillaChronicleMap) chronicleMap, builder.entrySize()); return new TcpReplicator(replica, entryExternalizable, replicationConfig, builder.entrySize(), statelessServer); @@ -49,8 +55,10 @@ final class Replicators { return new Replicator() { @Override - protected Closeable applyTo(AbstractChronicleMapBuilder builder, - Replica map, Replica.EntryExternalizable entryExternalizable, final VanillaChronicleMap chronicleMap) + protected Closeable applyTo(@NotNull final AbstractChronicleMapBuilder builder, + @NotNull final Replica map, + @NotNull final Replica.EntryExternalizable entryExternalizable, + final ChronicleMap chronicleMap) throws IOException { return new UdpReplicator(map, entryExternalizable, replicationConfig, builder.entrySize()); diff --git a/src/main/java/net/openhft/chronicle/map/TcpReplicator.java b/src/main/java/net/openhft/chronicle/map/TcpReplicator.java index c06313b70..2a5b79d39 100644 --- a/src/main/java/net/openhft/chronicle/map/TcpReplicator.java +++ b/src/main/java/net/openhft/chronicle/map/TcpReplicator.java @@ -18,6 +18,7 @@ package net.openhft.chronicle.map; +import net.openhft.chronicle.hash.TcpReplicationConfig; import net.openhft.lang.io.ByteBufferBytes; import net.openhft.lang.io.Bytes; import org.jetbrains.annotations.NotNull; @@ -46,7 +47,7 @@ import static net.openhft.chronicle.map.StatelessChronicleMap.EventId.HEARTBEAT; * * @author Rob Austin. */ -class TcpReplicator extends AbstractChannelReplicator implements Closeable { +public class TcpReplicator extends AbstractChannelReplicator implements Closeable { private static final Logger LOG = LoggerFactory.getLogger(TcpReplicator.class.getName()); @@ -79,11 +80,11 @@ class TcpReplicator extends AbstractChannelReplicator implements Closeable { * @param statelessServerConnector set to NULL if not required * @throws IOException */ - TcpReplicator(@NotNull final Replica replica, - @NotNull final Replica.EntryExternalizable externalizable, - @NotNull final TcpReplicationConfig replicationConfig, - final int maxEntrySizeBytes, - @Nullable StatelessServerConnector statelessServerConnector) throws IOException { + public TcpReplicator(@NotNull final Replica replica, + @NotNull final Replica.EntryExternalizable externalizable, + @NotNull final TcpReplicationConfig replicationConfig, + final int maxEntrySizeBytes, + @Nullable StatelessServerConnector statelessServerConnector) throws IOException { super("TcpSocketReplicator-" + replica.identifier(), replicationConfig.throttlingConfig(), maxEntrySizeBytes); diff --git a/src/main/java/net/openhft/chronicle/map/ThrottlingConfig.java b/src/main/java/net/openhft/chronicle/map/ThrottlingConfig.java index c11658266..77060c0a7 100644 --- a/src/main/java/net/openhft/chronicle/map/ThrottlingConfig.java +++ b/src/main/java/net/openhft/chronicle/map/ThrottlingConfig.java @@ -79,7 +79,7 @@ public class ThrottlingConfig { return create(maxBits, perUnit, DEFAULT_BUCKET_INTERVAL, DEFAULT_BUCKET_INTERVAL_UNIT); } - static void checkMillisecondBucketInterval(ThrottlingConfig config, String replicator) { + public static void checkMillisecondBucketInterval(ThrottlingConfig config, String replicator) { if (config.bucketInterval(MILLISECONDS) < 1) { throw new IllegalArgumentException( "Minimum throttle bucketing interval of 1 millisecond is supported by " + diff --git a/src/main/java/net/openhft/chronicle/map/UdpChannelReplicator.java b/src/main/java/net/openhft/chronicle/map/UdpChannelReplicator.java index 532129b75..337e48336 100644 --- a/src/main/java/net/openhft/chronicle/map/UdpChannelReplicator.java +++ b/src/main/java/net/openhft/chronicle/map/UdpChannelReplicator.java @@ -18,6 +18,7 @@ package net.openhft.chronicle.map; +import net.openhft.chronicle.hash.UdpReplicationConfig; import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -40,10 +41,10 @@ import static java.nio.channels.SelectionKey.OP_WRITE; /** - * The UdpReplicator attempts to read the data ( but it does not enforce or grantee delivery ), typically, you - * should use the UdpReplicator if you have a large number of nodes, and you wish to receive the data before - * it becomes available on TCP/IP. In order to not miss data, UdpReplicator should be used in conjunction with - * the TCP Replicator. + * The UdpReplicator attempts to read the data ( but it does not enforce or grantee delivery ), + * typically, you should use the UdpReplicator if you have a large number of nodes, and you wish to + * receive the data before it becomes available on TCP/IP. In order to not miss data, UdpReplicator + * should be used in conjunction with the TCP Replicator. */ class UdpChannelReplicator extends AbstractChannelReplicator implements Replica.ModificationNotifier, Closeable { @@ -69,7 +70,8 @@ class UdpChannelReplicator extends AbstractChannelReplicator implements Replica. * @throws IOException */ UdpChannelReplicator(@NotNull final UdpReplicationConfig replicationConfig, - final int maxPayloadSize, final byte localIdentifier) + final int maxPayloadSize, + final byte localIdentifier) throws IOException { super("UdpReplicator-" + localIdentifier, replicationConfig.throttlingConfig(), diff --git a/src/main/java/net/openhft/chronicle/map/UdpReplicationConfig.java b/src/main/java/net/openhft/chronicle/map/UdpReplicationConfig.java deleted file mode 100644 index 9d8a2c983..000000000 --- a/src/main/java/net/openhft/chronicle/map/UdpReplicationConfig.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2014 Higher Frequency Trading - * - * http://www.higherfrequencytrading.com - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package net.openhft.chronicle.map; - -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import java.net.InetAddress; -import java.net.NetworkInterface; - - -public abstract class UdpReplicationConfig implements ReplicationConfig { - - /** - * Package-private constructor forbids subclassing from outside of the package - */ - UdpReplicationConfig() { - // nothing to do - } - - public static UdpReplicationConfig simple(@NotNull InetAddress address, int port) { - if (address.isMulticastAddress()) - throw new IllegalArgumentException(); - - - return create(address, port, null, ThrottlingConfig.noThrottling()); - } - - public static UdpReplicationConfig multiCast(@NotNull InetAddress address, int port, - @NotNull NetworkInterface networkInterface) { - if (!address.isMulticastAddress() || networkInterface == null) - throw new IllegalArgumentException(); - return create(address, port, networkInterface, ThrottlingConfig.noThrottling()); - } - - static UdpReplicationConfig create(InetAddress address, int port, - NetworkInterface networkInterface, - ThrottlingConfig throttlingConfig) { - return new UdpReplicationConfigBean(address, port, networkInterface, - throttlingConfig); - } - - public abstract InetAddress address(); - - public abstract int port(); - - @Nullable - public abstract NetworkInterface networkInterface(); - - public abstract ThrottlingConfig throttlingConfig(); - - public UdpReplicationConfig throttlingConfig(ThrottlingConfig throttlingConfig) { - ThrottlingConfig.checkMillisecondBucketInterval(throttlingConfig, "UDP"); - return create(address(), port(), networkInterface(), throttlingConfig); - } -} diff --git a/src/main/java/net/openhft/chronicle/map/UdpReplicator.java b/src/main/java/net/openhft/chronicle/map/UdpReplicator.java index 8bd9b889e..ed43075dd 100644 --- a/src/main/java/net/openhft/chronicle/map/UdpReplicator.java +++ b/src/main/java/net/openhft/chronicle/map/UdpReplicator.java @@ -18,6 +18,7 @@ package net.openhft.chronicle.map; +import net.openhft.chronicle.hash.UdpReplicationConfig; import net.openhft.lang.io.ByteBufferBytes; import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; @@ -35,15 +36,15 @@ import java.nio.channels.DatagramChannel; * it becomes available on TCP/IP. In order to not miss data, UdpReplicator should be used in conjunction with * the TCP Replicator. */ -class UdpReplicator extends UdpChannelReplicator implements Replica.ModificationNotifier, Closeable { +public class UdpReplicator extends UdpChannelReplicator implements Replica.ModificationNotifier, Closeable { private static final Logger LOG = LoggerFactory.getLogger(UdpReplicator.class.getName()); - UdpReplicator(@NotNull final Replica replica, - @NotNull final Replica.EntryExternalizable entryExternalizable, - @NotNull final UdpReplicationConfig replicationConfig, - final int serializedEntrySize) + public UdpReplicator(@NotNull final Replica replica, + @NotNull final Replica.EntryExternalizable entryExternalizable, + @NotNull final UdpReplicationConfig replicationConfig, + final int serializedEntrySize) throws IOException { super(replicationConfig, serializedEntrySize, replica.identifier()); diff --git a/src/main/java/net/openhft/chronicle/set/ChronicleSetBuilder.java b/src/main/java/net/openhft/chronicle/set/ChronicleSetBuilder.java index c8e6dd74b..3a10f1ecb 100644 --- a/src/main/java/net/openhft/chronicle/set/ChronicleSetBuilder.java +++ b/src/main/java/net/openhft/chronicle/set/ChronicleSetBuilder.java @@ -18,11 +18,10 @@ package net.openhft.chronicle.set; -import net.openhft.chronicle.hash.ChronicleHashBuilder; -import net.openhft.chronicle.hash.ChronicleHashErrorListener; -import net.openhft.chronicle.hash.StatelessBuilder; -import net.openhft.chronicle.hash.TimeProvider; -import net.openhft.chronicle.map.*; +import net.openhft.chronicle.hash.*; +import net.openhft.chronicle.map.Alignment; +import net.openhft.chronicle.map.ChronicleMap; +import net.openhft.chronicle.map.ChronicleMapBuilder; import net.openhft.lang.io.serialization.BytesMarshaller; import net.openhft.lang.io.serialization.BytesMarshallerFactory; import net.openhft.lang.io.serialization.ObjectFactory; diff --git a/src/test/java/net/openhft/chronicle/map/Builder.java b/src/test/java/net/openhft/chronicle/map/Builder.java index e220bc2a1..1225a0fc9 100644 --- a/src/test/java/net/openhft/chronicle/map/Builder.java +++ b/src/test/java/net/openhft/chronicle/map/Builder.java @@ -19,6 +19,8 @@ package net.openhft.chronicle.map; +import net.openhft.chronicle.hash.TcpReplicationConfig; + import java.io.File; import java.io.IOException; import java.io.RandomAccessFile; diff --git a/src/test/java/net/openhft/chronicle/map/ChannelReplicationTest.java b/src/test/java/net/openhft/chronicle/map/ChannelReplicationTest.java index ff82cb2dc..c726da6eb 100644 --- a/src/test/java/net/openhft/chronicle/map/ChannelReplicationTest.java +++ b/src/test/java/net/openhft/chronicle/map/ChannelReplicationTest.java @@ -19,6 +19,9 @@ package net.openhft.chronicle.map; +import net.openhft.chronicle.hash.ChannelProvider; +import net.openhft.chronicle.hash.ChannelProviderBuilder; +import net.openhft.chronicle.hash.TcpReplicationConfig; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/src/test/java/net/openhft/chronicle/map/PostChannelCreationTest.java b/src/test/java/net/openhft/chronicle/map/PostChannelCreationTest.java index fa61053bf..dcd9890bc 100644 --- a/src/test/java/net/openhft/chronicle/map/PostChannelCreationTest.java +++ b/src/test/java/net/openhft/chronicle/map/PostChannelCreationTest.java @@ -19,6 +19,9 @@ package net.openhft.chronicle.map; +import net.openhft.chronicle.hash.ChannelProvider; +import net.openhft.chronicle.hash.ChannelProviderBuilder; +import net.openhft.chronicle.hash.TcpReplicationConfig; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/src/test/java/net/openhft/chronicle/map/SingleMapChannelTest.java b/src/test/java/net/openhft/chronicle/map/SingleMapChannelTest.java index c82e03cc3..8cbd1fe0b 100644 --- a/src/test/java/net/openhft/chronicle/map/SingleMapChannelTest.java +++ b/src/test/java/net/openhft/chronicle/map/SingleMapChannelTest.java @@ -19,6 +19,9 @@ package net.openhft.chronicle.map; +import net.openhft.chronicle.hash.ChannelProvider; +import net.openhft.chronicle.hash.ChannelProviderBuilder; +import net.openhft.chronicle.hash.TcpReplicationConfig; import org.junit.After; import org.junit.Assert; import org.junit.Before; diff --git a/src/test/java/net/openhft/chronicle/map/StatelessClientTest.java b/src/test/java/net/openhft/chronicle/map/StatelessClientTest.java index 27f762323..1117a7200 100644 --- a/src/test/java/net/openhft/chronicle/map/StatelessClientTest.java +++ b/src/test/java/net/openhft/chronicle/map/StatelessClientTest.java @@ -18,6 +18,7 @@ package net.openhft.chronicle.map; +import net.openhft.chronicle.hash.TcpReplicationConfig; import org.junit.Assert; import org.junit.Test; diff --git a/src/test/java/net/openhft/chronicle/map/TCPSocketReplicationTest3wayPutReturnsNull.java b/src/test/java/net/openhft/chronicle/map/TCPSocketReplicationTest3wayPutReturnsNull.java index a26b74b8b..4a2f2a52e 100644 --- a/src/test/java/net/openhft/chronicle/map/TCPSocketReplicationTest3wayPutReturnsNull.java +++ b/src/test/java/net/openhft/chronicle/map/TCPSocketReplicationTest3wayPutReturnsNull.java @@ -18,6 +18,7 @@ package net.openhft.chronicle.map; +import net.openhft.chronicle.hash.TcpReplicationConfig; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/src/test/java/net/openhft/chronicle/map/TwoMapOnDifferentServers.java b/src/test/java/net/openhft/chronicle/map/TwoMapOnDifferentServers.java index be2c08117..6d64e8ae2 100644 --- a/src/test/java/net/openhft/chronicle/map/TwoMapOnDifferentServers.java +++ b/src/test/java/net/openhft/chronicle/map/TwoMapOnDifferentServers.java @@ -18,6 +18,7 @@ package net.openhft.chronicle.map; +import net.openhft.chronicle.hash.TcpReplicationConfig; import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -29,7 +30,7 @@ import java.net.InetSocketAddress; import static java.util.concurrent.TimeUnit.SECONDS; import static net.openhft.chronicle.map.Builder.getPersistenceFile; -import static net.openhft.chronicle.map.TcpReplicationConfig.of; +import static net.openhft.chronicle.hash.TcpReplicationConfig.of; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; diff --git a/src/test/java/net/openhft/chronicle/map/UDPSocketReplicationTest.java b/src/test/java/net/openhft/chronicle/map/UDPSocketReplicationTest.java index 37a5cc17a..22887c0d8 100644 --- a/src/test/java/net/openhft/chronicle/map/UDPSocketReplicationTest.java +++ b/src/test/java/net/openhft/chronicle/map/UDPSocketReplicationTest.java @@ -18,6 +18,7 @@ package net.openhft.chronicle.map; +import net.openhft.chronicle.hash.UdpReplicationConfig; import org.junit.After; import org.junit.Before; diff --git a/src/test/java/net/openhft/chronicle/map/example/ChannelExample.java b/src/test/java/net/openhft/chronicle/map/example/ChannelExample.java index 2716fbfc1..404c74741 100644 --- a/src/test/java/net/openhft/chronicle/map/example/ChannelExample.java +++ b/src/test/java/net/openhft/chronicle/map/example/ChannelExample.java @@ -1,6 +1,10 @@ package net.openhft.chronicle.map.example; -import net.openhft.chronicle.map.*; +import net.openhft.chronicle.hash.ChannelProvider; +import net.openhft.chronicle.hash.ChannelProviderBuilder; +import net.openhft.chronicle.hash.TcpReplicationConfig; +import net.openhft.chronicle.map.ChronicleMap; +import net.openhft.chronicle.map.ChronicleMapBuilder; import org.junit.Assert; import org.junit.Test; diff --git a/src/test/java/net/openhft/chronicle/map/jrs166/map/StatelessChronicleMapTest.java b/src/test/java/net/openhft/chronicle/map/jrs166/map/StatelessChronicleMapTest.java index 9e03f3898..28f850b0d 100644 --- a/src/test/java/net/openhft/chronicle/map/jrs166/map/StatelessChronicleMapTest.java +++ b/src/test/java/net/openhft/chronicle/map/jrs166/map/StatelessChronicleMapTest.java @@ -20,7 +20,7 @@ package net.openhft.chronicle.map.jrs166.map; import net.openhft.chronicle.map.ChronicleMap; import net.openhft.chronicle.map.ChronicleMapBuilder; -import net.openhft.chronicle.map.TcpReplicationConfig; +import net.openhft.chronicle.hash.TcpReplicationConfig; import net.openhft.chronicle.map.jrs166.JSR166TestCase; import org.jetbrains.annotations.NotNull; import org.junit.Test; diff --git a/src/test/java/net/openhft/chronicle/set/SetForTCPSocketReplicationTest3way.java b/src/test/java/net/openhft/chronicle/set/SetForTCPSocketReplicationTest3way.java index 599874b91..efb1d7868 100644 --- a/src/test/java/net/openhft/chronicle/set/SetForTCPSocketReplicationTest3way.java +++ b/src/test/java/net/openhft/chronicle/set/SetForTCPSocketReplicationTest3way.java @@ -28,7 +28,7 @@ import java.net.InetSocketAddress; import static java.util.concurrent.TimeUnit.SECONDS; import static net.openhft.chronicle.map.Builder.getPersistenceFile; -import static net.openhft.chronicle.map.TcpReplicationConfig.of; +import static net.openhft.chronicle.hash.TcpReplicationConfig.of; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue;