public class ReplicationServerHandler extends ServerHandler
Modifier and Type | Field and Description |
---|---|
protected ReplicationServer |
replicationServer
Local hosting RS.
|
protected ReplicationServerDomain |
replicationServerDomain
Specifies the related replication server domain based on baseDN.
|
generationId, groupId, heartbeatInterval, serverId, serverURL, session, sslEncryption, weight
Constructor and Description |
---|
ReplicationServerHandler(Session session,
ReplicationServer replicationServer)
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.
|
int |
estimateNumberOfUnsentMessages()
Returns an estimation of the number of messages not yet sent.
|
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.
|
MonitorData |
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 changelog database.
|
CSN |
getOlderUpdateCSN()
Get the older CSN for that server.
|
int |
getReplicationServerId()
Get the serverId of the hosting replication server.
|
HostPort |
getReplicationServerURL()
Get the server URL of the hosting replication server.
|
HostPort |
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, incrementAssuredSdReceivedUpdates, incrementAssuredSdReceivedUpdatesTimeout, incrementAssuredSdSentUpdatesTimeout, incrementAssuredSrReceivedUpdates, incrementAssuredSrReceivedUpdatesTimeout, incrementAssuredSrSentUpdatesTimeout, initializeMonitorProvider, isReplicationServer, lockDomainNoTimeout, lockDomainWithTimeout, logStartHandshakeRCVandSND, logStartHandshakeSNDandRCV, logStartSessionHandshake, logStopReceived, logTopoHandshakeRCVandSND, logTopoHandshakeSNDandRCV, put, releaseDomainLock, replyToWindowProbe, send, sendTopoInfo, setGenerationId, take, toRSInfo
finalizeMonitorProvider, getMonitorInstanceDn, getMonitorObjectClass, isConfigurationAcceptable, scheduleUpdate
protected final ReplicationServer replicationServer
protected ReplicationServerDomain replicationServerDomain
public ReplicationServerHandler(Session session, ReplicationServer replicationServer)
session
- The session with the remote RS.replicationServer
- The hosting local RS object.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 MonitorData getMonitorData()
MonitorProvider
getMonitorData
in class ServerHandler
public String toString()
public ServerStatus getStatus()
getStatus
in class ServerHandler
public HostPort 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 there is no updateChangelogException
- If a problem occurs when reading the changelogpublic CSN getOlderUpdateCSN()
public int estimateNumberOfUnsentMessages()
public ServerState getServerState()
protected Dn getBaseDN()
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 HostPort getReplicationServerURL()
Copyright 2010-2020 ForgeRock AS.