|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opends.server.replication.protocol.ReplicationMsg
org.opends.server.replication.protocol.AckMsg
public class AckMsg
AckMsg messages are used for acknowledging an update that has been sent requesting an ack: update sent in Assured Mode, either safe data or safe read sub mode. The change number refers to the update change number that was requested to be acknowledged. If some errors occurred during attempt to acknowledge the update in the path to final servers, errors are marked with the following fields: - hasTimeout: Some servers went in timeout when the matching update was sent. - hasWrongStatus: Some servers were in a status where we cannot ask for an ack when the matching update was sent. - hasReplayError: Some servers made an error replaying the sent matching update. - failedServers: The list of server ids that had errors for the sent matching update. Each server id of the list had one of the 3 possible errors (timeout/wrong status /replay error) AckMsg messages are sent all along the reverse path of the path followed an update message.
| Constructor Summary | |
|---|---|
AckMsg(byte[] in)
Creates a new AckMsg by decoding the provided byte array. |
|
AckMsg(ChangeNumber changeNumber)
Creates a new AckMsg from a ChangeNumber (no errors). |
|
AckMsg(ChangeNumber changeNumber,
boolean hasTimeout,
boolean hasWrongStatus,
boolean hasReplayError,
java.util.List<java.lang.Integer> failedServers)
Creates a new AckMsg from a ChangeNumber (with specified error info). |
|
| Method Summary | |
|---|---|
java.lang.String |
errorsToString()
Transforms the errors information of the ack into human readable string. |
byte[] |
getBytes()
Return the byte[] representation of this message. |
ChangeNumber |
getChangeNumber()
Get the ChangeNumber from the message. |
java.util.List<java.lang.Integer> |
getFailedServers()
Get the list of failed servers. |
boolean |
hasReplayError()
Tells if the matching update had replay error. |
boolean |
hasTimeout()
Tells if the matching update had timeout. |
boolean |
hasWrongStatus()
Tells if the matching update had wrong status error. |
void |
setFailedServers(java.util.List<java.lang.Integer> idList)
Sets the list of failing servers for this message. |
void |
setHasReplayError(boolean hasReplayError)
Sets the replay error marker for this message. |
void |
setHasTimeout(boolean hasTimeout)
Sets the timeout marker for this message. |
void |
setHasWrongStatus(boolean hasWrongStatus)
Sets the wrong status marker for this message. |
| Methods inherited from class org.opends.server.replication.protocol.ReplicationMsg |
|---|
addByteArray, generateMsg, getBytes, getNextLength |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AckMsg(ChangeNumber changeNumber)
changeNumber - The ChangeNumber used to build the AckMsg.
public AckMsg(ChangeNumber changeNumber,
boolean hasTimeout,
boolean hasWrongStatus,
boolean hasReplayError,
java.util.List<java.lang.Integer> failedServers)
changeNumber - The ChangeNumber used to build the AckMsg.hasTimeout - The hasTimeout infohasWrongStatus - The hasWrongStatus infohasReplayError - The hasReplayError infofailedServers - The list of failed servers
public AckMsg(byte[] in)
throws java.util.zip.DataFormatException
in - The byte array containing the encoded form of the AckMsg.
java.util.zip.DataFormatException - If in does not contain a properly encoded
AckMsg.| Method Detail |
|---|
public void setHasTimeout(boolean hasTimeout)
hasTimeout - True if some timeout occurredpublic void setHasWrongStatus(boolean hasWrongStatus)
hasWrongStatus - True if some servers were in wrong statuspublic void setHasReplayError(boolean hasReplayError)
hasReplayError - True if some servers had errors replaying the changepublic void setFailedServers(java.util.List<java.lang.Integer> idList)
idList - The list of failing servers for this message.public ChangeNumber getChangeNumber()
public byte[] getBytes()
getBytes in class ReplicationMsgpublic boolean hasTimeout()
public boolean hasWrongStatus()
public boolean hasReplayError()
public java.util.List<java.lang.Integer> getFailedServers()
public java.lang.String errorsToString()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||