public class AckMsg extends ReplicationMsg
MSG_TYPE_DISK_ENCODING
Constructor and Description |
---|
AckMsg(CSN csn)
Creates a new AckMsg from a CSN (no errors).
|
AckMsg(CSN csn,
boolean hasTimeout,
boolean hasWrongStatus,
boolean hasReplayError,
List<Integer> failedServers)
Creates a new AckMsg from a CSN (with specified error info).
|
Modifier and Type | Method and Description |
---|---|
String |
errorsToString()
Transforms the errors information of the ack into human readable string.
|
byte[] |
getBytes(short protocolVersion)
Serializes the PDU using the provided replication protocol version.
|
CSN |
getCSN()
Get the CSN from the message.
|
List<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(List<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.
|
generateMsg
public AckMsg(CSN csn)
csn
- The CSN used to build the AckMsg.public AckMsg(CSN csn, boolean hasTimeout, boolean hasWrongStatus, boolean hasReplayError, List<Integer> failedServers)
csn
- The CSN used to build the AckMsg.hasTimeout
- The hasTimeout infohasWrongStatus
- The hasWrongStatus infohasReplayError
- The hasReplayError infofailedServers
- The list of failed serverspublic 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(List<Integer> idList)
idList
- The list of failing servers for this message.public byte[] getBytes(short protocolVersion)
getBytes
in class ReplicationMsg
protocolVersion
- The protocol version to use for serialization. The version should
normally be older than the current one.null
if the message isn't supported
in that protocol version.public boolean hasTimeout()
public boolean hasWrongStatus()
public boolean hasReplayError()
public List<Integer> getFailedServers()
public String errorsToString()
Copyright © 2010-2017 ForgeRock AS. All Rights Reserved.