public abstract class ExpectedAcksInfo extends Object
Modifier and Type | Field and Description |
---|---|
protected CSN |
csn
The CSN of the assured update message we want acks for.
|
protected Map<Integer,Boolean> |
expectedServersAckStatus
This gives the list of servers we are willing to wait acks from and the information about the ack from the
servers.
|
protected List<Integer> |
serversInTimeout
Facility for monitoring: If the timeout occurs for the original update, we call createAck(true) in the timeout
code for sending back an error ack to the original server.
|
Modifier | Constructor and Description |
---|---|
protected |
ExpectedAcksInfo(CSN csn,
org.opends.server.replication.server.ServerHandler requesterServerHandler,
AssuredMode assuredMode,
List<Integer> expectedServers)
Creates a new ExpectedAcksInfo.
|
Modifier and Type | Method and Description |
---|---|
void |
completed()
Signal that treatment of this object has been completed and that it is going to be removed from the map where it
is stored.
|
boolean |
contains(int serverId)
Returns
true if we're waiting for ACKs from the provided server. |
abstract AckMsg |
createAck(boolean timeout)
Creates the ack message to be returned to the requester server, taking into account the information in the
received acks from every servers.
|
AssuredMode |
getAssuredMode()
Gets the requested assured mode for the matching update message.
|
org.opends.server.replication.server.ServerHandler |
getRequesterServer()
Gets the server handler of the server which requested the acknowledgments.
|
List<Integer> |
getTimeoutServers()
Gets the list of expected servers that did not respond in time.
|
boolean |
isCompleted()
Has the treatment of this object been completed or not? If true is returned, one must not modify this object
(useless) nor remove it from the map where it is stored (will be or has already been done by the other code (ack
timeout code, or ack processing code)).
|
abstract boolean |
processReceivedAck(org.opends.server.replication.server.ServerHandler ackingServer,
AckMsg ackMsg)
Process the received ack from a server we are waiting an ack from.
|
protected CSN csn
protected Map<Integer,Boolean> expectedServersAckStatus
protected List<Integer> serversInTimeout
protected ExpectedAcksInfo(CSN csn, org.opends.server.replication.server.ServerHandler requesterServerHandler, AssuredMode assuredMode, List<Integer> expectedServers)
csn
- The CSN of the assured update messagerequesterServerHandler
- The server handler of the server that sent the assured update messageassuredMode
- The assured mode requested by the assured update messageexpectedServers
- The list of servers we want an ack frompublic org.opends.server.replication.server.ServerHandler getRequesterServer()
public List<Integer> getTimeoutServers()
public AssuredMode getAssuredMode()
public abstract boolean processReceivedAck(org.opends.server.replication.server.ServerHandler ackingServer, AckMsg ackMsg)
ackingServer
- The server handler of the server that sent the ackackMsg
- The ack message to processpublic abstract AckMsg createAck(boolean timeout)
timeout
- True if we call this method when the timeout occurred, that is we did not received every expected acks
in time, and thus, the timeout flag should also be enabled in the returned ack message.public boolean isCompleted()
public void completed()
public boolean contains(int serverId)
true
if we're waiting for ACKs from the provided server.serverId
- the server to check for waiting ACKs from.true
if we're waiting for ACKs from the provided server.Copyright 2010-2018 ForgeRock AS.