com.continuent.tungsten.replicator.thl
Class ProtocolHandshakeResponse

java.lang.Object
  extended by com.continuent.tungsten.replicator.thl.ProtocolMessage
      extended by com.continuent.tungsten.replicator.thl.ProtocolHandshakeResponse
All Implemented Interfaces:
java.io.Serializable

public class ProtocolHandshakeResponse
extends ProtocolMessage

This class defines a ProtocolHandshakeResponse, which clients return to the THL server. Clients can specify options, which affect the network connection from the server.

Version:
1.0
Author:
Teemu Ollakka
See Also:
Serialized Form

Constructor Summary
ProtocolHandshakeResponse(java.lang.String sourceId, long lastEpochNumber, long lastSeqno, int heartbeatMillis)
          Create a new instance.
 
Method Summary
 int getHeartbeatMillis()
          Returns the number of milliseconds between heartbeats.
 long getLastEpochNumber()
          Returns the last epoch number in log.
 long getLastSeqno()
          Returns the sequence number in log.
 java.lang.String getOption(java.lang.String name)
          Gets an option value.
 java.util.Map<java.lang.String,java.lang.String> getOptions()
          Returns the current option settings or null if no options exist.
 java.lang.String getSourceId()
          Returns the source ID.
 void setOption(java.lang.String name, java.lang.String value)
          Sets option value.
 
Methods inherited from class com.continuent.tungsten.replicator.thl.ProtocolMessage
getPayload
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProtocolHandshakeResponse

public ProtocolHandshakeResponse(java.lang.String sourceId,
                                 long lastEpochNumber,
                                 long lastSeqno,
                                 int heartbeatMillis)
Create a new instance.

Parameters:
sourceId - Source ID of client.
Method Detail

getSourceId

public java.lang.String getSourceId()
Returns the source ID.


getLastEpochNumber

public long getLastEpochNumber()
Returns the last epoch number in log.


getLastSeqno

public long getLastSeqno()
Returns the sequence number in log.


getHeartbeatMillis

public int getHeartbeatMillis()
Returns the number of milliseconds between heartbeats.


getOptions

public java.util.Map<java.lang.String,java.lang.String> getOptions()
Returns the current option settings or null if no options exist. Older replicators do not return options.


getOption

public java.lang.String getOption(java.lang.String name)
Gets an option value.


setOption

public void setOption(java.lang.String name,
                      java.lang.String value)
Sets option value.