Package org.jgroups.raft.client
Class ReplicatedStateMachineClient
java.lang.Object
org.jgroups.raft.client.ReplicatedStateMachineClient
- All Implemented Interfaces:
org.jgroups.blocks.cs.ConnectionListener,org.jgroups.blocks.cs.Receiver
public class ReplicatedStateMachineClient
extends Object
implements org.jgroups.blocks.cs.Receiver, org.jgroups.blocks.cs.ConnectionListener
Client connecting to a remote
ReplicatedStateMachineDemo.- Since:
- 1.0.0
- Author:
- Bela Ban
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.jgroups.blocks.cs.TcpClientprotected static final byte[]protected static final byte[]protected booleanprotected static final byte[]protected static final byte[]protected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidconnectionClosed(org.jgroups.blocks.cs.Connection conn) voidconnectionEstablished(org.jgroups.blocks.cs.Connection conn) protected voiddumpLog()protected voidprotected voidprotected voidgetView()static voidprotected voidprotected static Stringvoidreceive(org.jgroups.Address sender, byte[] buf, int offset, int length) voidvoidreceive(org.jgroups.Address sender, ByteBuffer buf) protected voidprotected voidshowAll()protected voidsnapshot()voidstart(InetAddress host, int port) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jgroups.blocks.cs.Receiver
receive
-
Field Details
-
client
protected org.jgroups.blocks.cs.TcpClient client -
running
protected volatile boolean running -
verbose
protected volatile boolean verbose -
SHOW_ALL_CMD
protected static final byte[] SHOW_ALL_CMD -
DUMP_CMD
protected static final byte[] DUMP_CMD -
SNAPSHOT_CMD
protected static final byte[] SNAPSHOT_CMD -
GET_VIEW_CMD
protected static final byte[] GET_VIEW_CMD
-
-
Constructor Details
-
ReplicatedStateMachineClient
public ReplicatedStateMachineClient(boolean verbose)
-
-
Method Details
-
start
- Throws:
Exception
-
receive
public void receive(org.jgroups.Address sender, byte[] buf, int offset, int length) - Specified by:
receivein interfaceorg.jgroups.blocks.cs.Receiver
-
receive
- Specified by:
receivein interfaceorg.jgroups.blocks.cs.Receiver
-
receive
- Specified by:
receivein interfaceorg.jgroups.blocks.cs.Receiver- Throws:
Exception
-
main
- Throws:
Exception
-
connectionClosed
public void connectionClosed(org.jgroups.blocks.cs.Connection conn) - Specified by:
connectionClosedin interfaceorg.jgroups.blocks.cs.ConnectionListener
-
connectionEstablished
public void connectionEstablished(org.jgroups.blocks.cs.Connection conn) - Specified by:
connectionEstablishedin interfaceorg.jgroups.blocks.cs.ConnectionListener
-
eventLoop
- Throws:
Exception
-
put
- Throws:
Exception
-
get
- Throws:
Exception
-
remove
- Throws:
Exception
-
showAll
- Throws:
Exception
-
dumpLog
- Throws:
Exception
-
snapshot
- Throws:
Exception
-
getView
- Throws:
Exception
-
read
-