public class ReplicationServerHandler extends ServerHandler
Modifier and Type | Field and Description |
---|---|
protected int |
maxQueueSize
Specifies the max queue size for this handler.
|
protected ReplicationServer |
replicationServer
Local hosting RS.
|
protected ReplicationServerDomain |
replicationServerDomain
Specifies the related replication server domain based on baseDN.
|
generationId, groupId, heartbeatInterval, localGenerationId, maxRcvWindow, oldGenerationId, serverId, serverURL, session, sslEncryption, weight
Constructor and Description |
---|
ReplicationServerHandler(Session session,
int queueSize,
ReplicationServer replicationServer,
int rcvWindowSize)
Creates a new handler object to a remote replication server.
|
Modifier and Type | Method and Description |
---|---|
void |
addDSInfos(List<DSInfo> dsInfos)
Add the DSinfos of the connected Directory Servers
to the List of DSInfo provided as a parameter.
|
void |
connect(DN baseDN,
boolean sslEncryption)
Connect the hosting RS to the RS represented by THIS handler
on an outgoing connection.
|
protected DN |
getBaseDN()
Get the baseDN for this handler.
|
Set<Integer> |
getConnectedDirectoryServerIds()
Return a Set containing the servers known by this replicationServer.
|
byte |
getLocalGroupId()
Get the groupId of the hosting RS.
|
List<Attribute> |
getMonitorData()
Retrieves a set of attributes containing monitor data that should
be returned to the client if the corresponding monitor entry is
requested.
|
String |
getMonitorInstanceName()
Retrieves the name of this monitor provider.
|
protected UpdateMsg |
getNextMessage()
Get the next update that must be sent to the consumer from the message queue or from the database.
|
CSN |
getOlderUpdateCSN()
Get the older CSN for that server.
|
int |
getRcvMsgQueueSize()
Get the number of message in the receive message queue.
|
int |
getReplicationServerId()
Get the serverId of the hosting replication server.
|
String |
getReplicationServerURL()
Get the server URL of the hosting replication server.
|
String |
getServerAddressURL()
Retrieves the Address URL for this server handler.
|
ServerState |
getServerState()
Get the state of this server.
|
ServerStatus |
getStatus()
Gets the status of the connected DS.
|
boolean |
hasRemoteLDAPServers()
When the handler is connected to a replication server, specifies the
replication server has remote LDAP servers connected to it.
|
boolean |
isDataServer()
Check if the server associated to this ServerHandler is a data server
in the topology.
|
boolean |
isRemoteLDAPServer(int serverId)
When this handler is connected to a replication server, specifies if
a wanted server is connected to this replication server.
|
void |
processTopoInfoFromRS(TopologyMsg topoMsg)
Stores topology information received from a peer RS and that must be kept
in RS handler.
|
void |
receiveTopoInfoFromRS(TopologyMsg topoMsg)
Receives a topology msg.
|
protected void |
setBaseDNAndDomain(DN baseDN,
boolean isDataServer)
Set the baseDN for this handler.
|
void |
setConsumerActive(boolean active)
Set that the consumer is now becoming inactive and thus getNextMessage
should not return any UpdateMsg any more.
|
void |
setInitialServerState(ServerState serverState)
Set the initial value of the serverState for this handler.
|
void |
shutdown()
Shutdown This ServerHandler.
|
void |
startFromRemoteRS(ReplServerStartMsg inReplServerStartMsg)
Starts the handler from a remote ReplServerStart message received from
the remote replication server.
|
String |
toString() |
abortStart, checkWindow, createReplServerStartMsg, doStop, finalizeStart, getApproxFirstMissingDate, getAssuredSdReceivedUpdates, getAssuredSdReceivedUpdatesTimeout, getAssuredSdSentUpdates, getAssuredSdSentUpdatesTimeout, getAssuredSrReceivedUpdates, getAssuredSrReceivedUpdatesTimeout, getAssuredSrSentUpdates, getAssuredSrSentUpdatesTimeout, getBadlyDisconnectedErrorMessage, getDomain, getGenerationId, getGroupId, getHeartbeatInterval, getProtocolVersion, getReferenceGenId, getServerId, getServerURL, incrementAssuredSdReceivedUpdates, incrementAssuredSdReceivedUpdatesTimeout, incrementAssuredSdSentUpdatesTimeout, incrementAssuredSrReceivedUpdates, incrementAssuredSrReceivedUpdatesTimeout, incrementAssuredSrSentUpdatesTimeout, initializeMonitorProvider, isReplicationServer, lockDomainNoTimeout, lockDomainWithTimeout, logStartHandshakeRCVandSND, logStartHandshakeSNDandRCV, logStartSessionHandshake, logStopReceived, logTopoHandshakeRCVandSND, logTopoHandshakeSNDandRCV, put, releaseDomainLock, replyToWindowProbe, send, sendTopoInfo, setGenerationId, setSendWindowSize, take, toRSInfo, updateWindow
finalizeMonitorProvider, getMonitorObjectClass, isConfigurationAcceptable, scheduleUpdate
protected final ReplicationServer replicationServer
protected ReplicationServerDomain replicationServerDomain
protected final int maxQueueSize
public ReplicationServerHandler(Session session, int queueSize, ReplicationServer replicationServer, int rcvWindowSize)
session
- The session with the remote RS.queueSize
- The queue size to manage updates to that RS.replicationServer
- The hosting local RS object.rcvWindowSize
- The receiving window size.public void connect(DN baseDN, boolean sslEncryption) throws DirectoryException
baseDN
- The baseDNsslEncryption
- The sslEncryption requested to the remote RS.DirectoryException
- when an error occurs.public void startFromRemoteRS(ReplServerStartMsg inReplServerStartMsg)
inReplServerStartMsg
- The provided ReplServerStart message received.public boolean isDataServer()
isDataServer
in class ServerHandler
public void addDSInfos(List<DSInfo> dsInfos)
dsInfos
- The List of DSInfo that should be updated
with the DSInfo for the remoteDirectoryServers
connected to this ServerHandler.public void shutdown()
shutdown
in class ServerHandler
public void processTopoInfoFromRS(TopologyMsg topoMsg)
topoMsg
- The received topology messagepublic boolean isRemoteLDAPServer(int serverId)
serverId
- The server we want to know if it is connected
to the replication server represented by this handler.public boolean hasRemoteLDAPServers()
public Set<Integer> getConnectedDirectoryServerIds()
public String getMonitorInstanceName()
getMonitorInstanceName
in class ServerHandler
public List<Attribute> getMonitorData()
getMonitorData
in class ServerHandler
public ServerStatus getStatus()
getStatus
in class ServerHandler
public String getServerAddressURL()
public void receiveTopoInfoFromRS(TopologyMsg topoMsg) throws DirectoryException, IOException
topoMsg
- The message received.DirectoryException
- when it occurs.IOException
- when it occurs.protected UpdateMsg getNextMessage() throws ChangelogException
null
when queue is emptyChangelogException
- If a problem occurs when reading the changelogpublic CSN getOlderUpdateCSN()
public int getRcvMsgQueueSize()
public ServerState getServerState()
public void setConsumerActive(boolean active)
active
- the provided state of the consumer.public void setInitialServerState(ServerState serverState) throws DirectoryException
serverState
- the provided serverState.DirectoryException
- raised when a problem occurs.protected void setBaseDNAndDomain(DN baseDN, boolean isDataServer) throws DirectoryException
baseDN
- The provided baseDN.isDataServer
- The handler is a dataServerDirectoryException
- raised when a problem occurs.public byte getLocalGroupId()
public int getReplicationServerId()
public String getReplicationServerURL()
Copyright © 2010-2015 ForgeRock AS. All Rights Reserved.