mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
CE-57 adding support for engine to engine replication
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
package net.openhft.chronicle.map;
|
||||
|
||||
import net.openhft.chronicle.hash.replication.EngineReplicationLangBytesConsumer;
|
||||
import net.openhft.chronicle.hash.replication.ReplicationHub;
|
||||
import net.openhft.chronicle.hash.replication.TcpTransportAndNetworkConfig;
|
||||
import net.openhft.chronicle.hash.replication.UdpTransportConfig;
|
||||
@@ -58,9 +59,10 @@ final class ChannelProvider implements Closeable {
|
||||
if (channelProvider != null)
|
||||
return channelProvider;
|
||||
channelProvider = new ChannelProvider(hub);
|
||||
|
||||
|
||||
|
||||
TcpTransportAndNetworkConfig tcpConfig = hub.tcpTransportAndNetwork();
|
||||
|
||||
|
||||
if (tcpConfig != null) {
|
||||
|
||||
final TcpReplicator tcpReplicator = new TcpReplicator(
|
||||
@@ -158,11 +160,26 @@ final class ChannelProvider implements Closeable {
|
||||
|
||||
private final byte localIdentifier;
|
||||
final Replica asReplica = new Replica() {
|
||||
@Override
|
||||
public void put(final Bytes key, final Bytes value, final byte remoteIdentifier, final long timestamp) {
|
||||
throw new UnsupportedOperationException("todo");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(final Bytes key, final byte remoteIdentifier, final long timestamp) {
|
||||
throw new UnsupportedOperationException("todo");
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte identifier() {
|
||||
return localIdentifier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EngineModificationIterator acquireEngineModificationIterator(final byte remoteIdentifier) {
|
||||
throw new UnsupportedOperationException("todo");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModificationIterator acquireModificationIterator(
|
||||
final byte remoteIdentifier) {
|
||||
@@ -472,11 +489,26 @@ final class ChannelProvider implements Closeable {
|
||||
class SystemQueue {
|
||||
|
||||
final Replica asReplica = new Replica() {
|
||||
@Override
|
||||
public void put(final Bytes key, final Bytes value, final byte remoteIdentifier, final long timestamp) {
|
||||
throw new UnsupportedOperationException("todo");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(final Bytes key, final byte remoteIdentifier, final long timestamp) {
|
||||
throw new UnsupportedOperationException("todo");
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte identifier() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public EngineModificationIterator acquireEngineModificationIterator(final byte remoteIdentifier) {
|
||||
throw new UnsupportedOperationException("todo");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModificationIterator acquireModificationIterator(
|
||||
final byte remoteIdentifier) {
|
||||
|
||||
Reference in New Issue
Block a user