|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.continuent.tungsten.replicator.thl.Protocol
public class Protocol
This class defines a Protocol
| Field Summary | |
|---|---|
protected java.lang.String |
clientSourceId
|
static java.lang.String |
MAX_SEQNO
|
static java.lang.String |
MIN_SEQNO
|
protected java.io.ObjectInputStream |
ois
|
protected java.io.ObjectOutputStream |
oos
|
protected PluginContext |
pluginContext
|
protected int |
resetPeriod
|
static java.lang.String |
ROLE
|
protected TungstenProperties |
serverCapabilities
|
protected SocketWrapper |
socket
|
static java.lang.String |
SOURCE_ID
|
static java.lang.String |
VERSION
|
| Constructor Summary | |
|---|---|
Protocol()
Creates a new Protocol object |
|
Protocol(PluginContext context,
SocketWrapper socket)
Creates a new Protocol object |
|
Protocol(PluginContext context,
SocketWrapper socket,
int resetPeriod)
|
|
| Method Summary | |
|---|---|
SeqNoRange |
clientHandshake(long lastEpochNumber,
long lastSeqno,
int heartbeatMillis,
java.lang.String lastEventId)
Define a client handshake event including attendant information. |
long |
getClientLastEpochNumber()
Returns the epoch number of last event received by client. |
long |
getClientLastSeqno()
Returns the log sequence number of last event received by client. |
java.lang.String |
getClientSourceId()
Returns the client source ID, which is set by a client protocol response to a server. |
TungstenProperties |
getServerCapabities()
Returns server capabilities downloaded to client. |
protected ProtocolMessage |
readMessage()
TODO: readMessage definition. |
ReplEvent |
requestReplEvent(long seqNo)
TODO: requestReplicationDBMSEvent definition. |
void |
sendError(java.lang.String message)
Send an error message back to client. |
void |
sendHeartbeat()
Send a heartbeat message to client. |
void |
sendReplEvent(ReplEvent event,
boolean forceSend)
TODO: sendReplicationDBMSEvent definition. |
void |
serverHandshake(ProtocolHandshakeResponseValidator validator,
long minSeqNo,
long maxSeqNo)
TODO: serverHandshake definition. |
ProtocolReplEventRequest |
waitReplEventRequest()
TODO: waitReplicationDBMSEventRequest definition. |
protected void |
writeMessage(ProtocolMessage msg)
TODO: writeMessage definition. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String SOURCE_ID
public static java.lang.String ROLE
public static java.lang.String VERSION
public static java.lang.String MIN_SEQNO
public static java.lang.String MAX_SEQNO
protected PluginContext pluginContext
protected SocketWrapper socket
protected TungstenProperties serverCapabilities
protected int resetPeriod
protected java.io.ObjectInputStream ois
protected java.io.ObjectOutputStream oos
protected java.lang.String clientSourceId
| Constructor Detail |
|---|
public Protocol()
Protocol object
public Protocol(PluginContext context,
SocketWrapper socket)
throws java.io.IOException
Protocol object
java.io.IOException
public Protocol(PluginContext context,
SocketWrapper socket,
int resetPeriod)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public java.lang.String getClientSourceId()
public long getClientLastEpochNumber()
public long getClientLastSeqno()
public TungstenProperties getServerCapabities()
protected ProtocolMessage readMessage()
throws java.io.IOException,
ReplicatorException
java.io.IOException
ReplicatorException
protected void writeMessage(ProtocolMessage msg)
throws java.io.IOException
msg -
java.io.IOException
RemoteProtocolException
public void serverHandshake(ProtocolHandshakeResponseValidator validator,
long minSeqNo,
long maxSeqNo)
throws ReplicatorException,
java.io.IOException,
java.lang.InterruptedException
minSeqNo - maxSeqNo -
ReplicatorException
java.io.IOException
java.lang.InterruptedException
public SeqNoRange clientHandshake(long lastEpochNumber,
long lastSeqno,
int heartbeatMillis,
java.lang.String lastEventId)
throws ReplicatorException,
java.io.IOException
lastEpochNumber - Epoch number client has from last sequence numberlastSeqno - Last sequence number client receivedheartbeatMillis - Number of milliseconds between heartbeat events
ReplicatorException
java.io.IOException
public ReplEvent requestReplEvent(long seqNo)
throws ReplicatorException,
java.io.IOException
seqNo -
ReplicatorException
java.io.IOException
public ProtocolReplEventRequest waitReplEventRequest()
throws ReplicatorException,
java.io.IOException
ReplicatorException
java.io.IOException
public void sendReplEvent(ReplEvent event,
boolean forceSend)
throws java.io.IOException
event - forceSend - TODO
java.io.IOException
public void sendError(java.lang.String message)
throws java.io.IOException
java.io.IOException
public void sendHeartbeat()
throws java.io.IOException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||