From 0c73a072eb874ffd3de3f31ac8d5f29eacd4fa6e Mon Sep 17 00:00:00 2001 From: leventov Date: Mon, 15 Jun 2015 22:00:06 +0300 Subject: [PATCH] Fix compilation issues --- .../hash/impl/VanillaChronicleHash.java | 3 +- .../map/AbstractChannelReplicator.java | 2 +- .../chronicle/map/ChronicleMapBuilder.java | 7 +-- .../chronicle/map/MapStatelessClient.java | 51 ------------------- .../chronicle/map/ReplicatedChronicleMap.java | 2 +- .../chronicle/map/StatelessChronicleMap.java | 2 +- .../chronicle/map/DefaultValueTest.java | 1 + 7 files changed, 10 insertions(+), 58 deletions(-) delete mode 100644 src/main/java/net/openhft/chronicle/map/MapStatelessClient.java diff --git a/src/main/java/net/openhft/chronicle/hash/impl/VanillaChronicleHash.java b/src/main/java/net/openhft/chronicle/hash/impl/VanillaChronicleHash.java index ceebf549d..bdd938afe 100644 --- a/src/main/java/net/openhft/chronicle/hash/impl/VanillaChronicleHash.java +++ b/src/main/java/net/openhft/chronicle/hash/impl/VanillaChronicleHash.java @@ -194,7 +194,8 @@ public abstract class VanillaChronicleHash implements try { // pushingToMapEventListener(); VanillaChronicleMap map = newMap(singleHashReplication, channel); - if(OS.warnOnWindows(map.sizeInBytes())){ - throw new IllegalStateException("Windows cannot support this configuration"); - } + // TODO this method had been moved +// if(OS.warnOnWindows(map.sizeInBytes())){ +// throw new IllegalStateException("Windows cannot support this configuration"); +// } BytesStore bytesStore = new DirectStore(JDKObjectSerializer.INSTANCE, map.sizeInBytes(), true); map.createMappedStoreAndSegments(bytesStore); diff --git a/src/main/java/net/openhft/chronicle/map/MapStatelessClient.java b/src/main/java/net/openhft/chronicle/map/MapStatelessClient.java deleted file mode 100644 index 81801e24f..000000000 --- a/src/main/java/net/openhft/chronicle/map/MapStatelessClient.java +++ /dev/null @@ -1,51 +0,0 @@ -package net.openhft.chronicle.map; - - -import net.openhft.chronicle.network.connection.AbstactStatelessClient; -import net.openhft.chronicle.network.connection.ClientWiredStatelessTcpConnectionHub; -import net.openhft.chronicle.wire.CoreFields; -import net.openhft.chronicle.wire.ParameterizeWireKey; -import net.openhft.chronicle.wire.ValueIn; -import org.jetbrains.annotations.NotNull; -import org.jetbrains.annotations.Nullable; - -import java.util.function.Function; - -/** - * Created by Rob Austin - */ -public abstract class MapStatelessClient extends AbstactStatelessClient { - - /** - * @param channelName - * @param hub - * @param type the type of wire handler for example "MAP" or "QUEUE" - * @param cid used by proxies such as the entry-set - */ - public MapStatelessClient(@NotNull String channelName, - @NotNull ClientWiredStatelessTcpConnectionHub hub, - @NotNull String type, - long cid) { - super(channelName, hub, type, cid); - - } - - @Nullable - protected R proxyReturnTypedObject( - @NotNull final E eventId, - R usingValue, - @NotNull final Class resultType, - @Nullable Object... args) { - - Function consumerIn = resultType == CharSequence.class && usingValue != null - ? f -> { - f.textTo((StringBuilder) usingValue); - return usingValue; - } - : f -> f.object(resultType); - return proxyReturnWireConsumerInOut(eventId, - CoreFields.reply, - toParameters(eventId, args), - consumerIn); - } -} diff --git a/src/main/java/net/openhft/chronicle/map/ReplicatedChronicleMap.java b/src/main/java/net/openhft/chronicle/map/ReplicatedChronicleMap.java index 597c5c7b6..3defb8fce 100644 --- a/src/main/java/net/openhft/chronicle/map/ReplicatedChronicleMap.java +++ b/src/main/java/net/openhft/chronicle/map/ReplicatedChronicleMap.java @@ -442,7 +442,7 @@ public class ReplicatedChronicleMap remoteOpContext = mapContext()) { remoteOpContext.initReplicationInput(source); - //remoteOpContext.processReplicatedEvent(); + remoteOpContext.processReplicatedEvent(); } } diff --git a/src/main/java/net/openhft/chronicle/map/StatelessChronicleMap.java b/src/main/java/net/openhft/chronicle/map/StatelessChronicleMap.java index b6c15201b..9ec66b29c 100644 --- a/src/main/java/net/openhft/chronicle/map/StatelessChronicleMap.java +++ b/src/main/java/net/openhft/chronicle/map/StatelessChronicleMap.java @@ -19,7 +19,7 @@ package net.openhft.chronicle.map; import net.openhft.chronicle.bytes.IORuntimeException; -import net.openhft.chronicle.core.util.CloseablesManager; +import net.openhft.chronicle.core.io.CloseablesManager; import net.openhft.chronicle.hash.Data; import net.openhft.chronicle.hash.function.SerializableFunction; import net.openhft.chronicle.hash.impl.util.BuildVersion; diff --git a/src/test/java/net/openhft/chronicle/map/DefaultValueTest.java b/src/test/java/net/openhft/chronicle/map/DefaultValueTest.java index fb853b8ef..9bc21852f 100644 --- a/src/test/java/net/openhft/chronicle/map/DefaultValueTest.java +++ b/src/test/java/net/openhft/chronicle/map/DefaultValueTest.java @@ -18,6 +18,7 @@ package net.openhft.chronicle.map; +import org.junit.Ignore; import org.junit.Test; import java.io.File;