mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
HCOLL-167 renamed to StatelessChronicleMap
This commit is contained in:
@@ -285,7 +285,7 @@ abstract class AbstractChannelReplicator implements Closeable {
|
||||
long pos0 = in.position();
|
||||
|
||||
// used to denote that this is not a stateless map event
|
||||
in.writeByte(StatelessMapClient.EventId.STATEFUL_UPDATE.ordinal());
|
||||
in.writeByte(StatelessChronicleMap.EventId.STATEFUL_UPDATE.ordinal());
|
||||
|
||||
long sizeLocation = in.position();
|
||||
|
||||
|
||||
@@ -668,7 +668,7 @@ public class ChronicleMapBuilder<K, V> implements Cloneable,
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChronicleMapBuilder<K, V> stateless(StatelessBuilder statelessBuilder) {
|
||||
public ChronicleMapBuilder<K, V> stateless(@NotNull StatelessBuilder statelessBuilder) {
|
||||
this.statelessBuilder = statelessBuilder;
|
||||
return this;
|
||||
}
|
||||
@@ -837,7 +837,7 @@ public class ChronicleMapBuilder<K, V> implements Cloneable,
|
||||
final KeyValueSerializer<K, V> keyValueSerializer
|
||||
= new KeyValueSerializer<K, V>(keyBuilder, valueBuilder);
|
||||
|
||||
return new StatelessMapClient<K, V>(keyValueSerializer, statelessBuilder);
|
||||
return new StatelessChronicleMap<K, V>(keyValueSerializer, statelessBuilder);
|
||||
}
|
||||
|
||||
private VanillaChronicleMap<K, ?, ?, V, ?, ?> newMap() throws IOException {
|
||||
|
||||
+6
-8
@@ -15,16 +15,14 @@ import java.nio.channels.SocketChannel;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import static net.openhft.chronicle.map.StatelessMapClient.EventId.*;
|
||||
import static net.openhft.chronicle.map.StatelessChronicleMap.EventId.*;
|
||||
|
||||
/**
|
||||
* **** THIS IS VERY MUCH IN DRAFT ***
|
||||
*
|
||||
* @author Rob Austin.
|
||||
*/
|
||||
class StatelessMapClient<K, V> implements ChronicleMap<K, V>, Closeable {
|
||||
class StatelessChronicleMap<K, V> implements ChronicleMap<K, V>, Closeable {
|
||||
|
||||
private static final Logger LOG = LoggerFactory.getLogger(StatelessMapClient.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(StatelessChronicleMap.class);
|
||||
|
||||
private final SocketChannel clientChannel;
|
||||
public static final ByteBuffer STATELESS_CLIENT_IDENTIFER = ByteBuffer.wrap(new byte[]{-127});
|
||||
@@ -58,8 +56,8 @@ class StatelessMapClient<K, V> implements ChronicleMap<K, V>, Closeable {
|
||||
// private long timeoutMs = TimeUnit.SECONDS.toMillis(20);
|
||||
|
||||
|
||||
public StatelessMapClient(final KeyValueSerializer<K, V> keyValueSerializer,
|
||||
final StatelessBuilder builder) throws IOException {
|
||||
public StatelessChronicleMap(final KeyValueSerializer<K, V> keyValueSerializer,
|
||||
final StatelessBuilder builder) throws IOException {
|
||||
|
||||
this.keyValueSerializer = keyValueSerializer;
|
||||
this.builder = builder;
|
||||
@@ -365,7 +363,7 @@ class StatelessMapClient<K, V> implements ChronicleMap<K, V>, Closeable {
|
||||
public final V setValue(V newValue) {
|
||||
V oldValue = value;
|
||||
|
||||
StatelessMapClient.this.put((K) getKey(), (V) newValue);
|
||||
StatelessChronicleMap.this.put((K) getKey(), (V) newValue);
|
||||
|
||||
return oldValue;
|
||||
}
|
||||
@@ -32,7 +32,7 @@ import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import static java.nio.channels.SelectionKey.*;
|
||||
import static net.openhft.chronicle.map.StatelessMapClient.EventId.HEARTBEAT;
|
||||
import static net.openhft.chronicle.map.StatelessChronicleMap.EventId.HEARTBEAT;
|
||||
|
||||
/**
|
||||
* Used with a {@see net.openhft.map.ReplicatedSharedHashMap} to send data between the maps using a
|
||||
@@ -1206,7 +1206,7 @@ class StatelessServerConnector<K, V> {
|
||||
|
||||
Work processStatelessEvent(byte eventId, @net.openhft.lang.model.constraints.NotNull Bytes in, @net.openhft.lang.model.constraints.NotNull Bytes out) {
|
||||
|
||||
final StatelessMapClient.EventId event = StatelessMapClient.EventId.values()[eventId];
|
||||
final StatelessChronicleMap.EventId event = StatelessChronicleMap.EventId.values()[eventId];
|
||||
|
||||
switch (event) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user