public class HASendState extends Object implements IHASendState, Externalizable
Constructor and Description |
---|
HASendState()
De-serialization constructor.
|
HASendState(long messageId,
UUID originalSenderId,
UUID senderId,
long token,
int replicationFactor) |
Modifier and Type | Method and Description |
---|---|
static IHASendState |
decode(byte[] a)
Decode the value returned by
getMarker() . |
boolean |
equals(Object obj) |
byte[] |
getMarker()
A byte[] marker that must prefix the message payload, needed to skip
stale data from failed read tasks.
|
long |
getMessageId()
A unique (one-up) message sequence identifier for the messages from the
sender.
|
UUID |
getOriginalSenderId()
The
UUID of the originating service. |
long |
getQuorumToken()
The current quorum token on the sender.
|
int |
getReplicationFactor()
The current replication factor on the sender.
|
UUID |
getSenderId()
The
UUID of the sending service. |
int |
hashCode() |
void |
readExternal(ObjectInput in) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
public long getMessageId()
IHASendState
getMessageId
in interface IHASendState
public UUID getOriginalSenderId()
IHASendState
UUID
of the originating service. This may be used to verify
that a message was sourced the expected quorum leader.getOriginalSenderId
in interface IHASendState
public UUID getSenderId()
IHASendState
UUID
of the sending service. This may be used to verify that
a message was sourced the expected upstream service.getSenderId
in interface IHASendState
public long getQuorumToken()
IHASendState
getQuorumToken
in interface IHASendState
public int getReplicationFactor()
IHASendState
getReplicationFactor
in interface IHASendState
public byte[] getMarker()
IHASendState
getMarker
in interface IHASendState
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public static IHASendState decode(byte[] a) throws IOException
getMarker()
. This has the magic
followed by writeExternal2(DataOutput)
. It does not have the
object serialization metadata.a
- The encoded marker.null
iff the argument is
null
.IOException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
IOException
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.