public class HAWriteMessage extends HAWriteMessageBase implements IHAWriteMessage
Modifier and Type | Field and Description |
---|---|
protected static org.apache.log4j.Logger |
log |
Constructor and Description |
---|
HAWriteMessage()
De-serialization constructor.
|
HAWriteMessage(UUID uuid,
long commitCounter,
long commitTime,
long sequence,
int sze,
int chk,
StoreTypeEnum storeType,
long quorumToken,
int replicationFactor,
long fileExtent,
long firstOffset,
String compressorKey) |
HAWriteMessage(UUID uuid,
long commitCounter,
long commitTime,
long sequence,
int sze,
int chk,
StoreTypeEnum storeType,
long quorumToken,
long fileExtent,
long firstOffset)
Deprecated.
by the version that accepts the compressor key.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
ByteBuffer |
expand(ByteBuffer buffer)
Applies associated
IRecordCompressor (if any) to decompress the
data |
long |
getCommitCounter()
The commit counter for the opening root block associated with the write set for this message.
|
String |
getCompressorKey()
Return the associated
IRecordCompressor key (if any). |
long |
getFileExtent()
The length of the backing file on the disk.
|
long |
getFirstOffset()
The file offset at which the data will be written (WORM only or for Rebuild request).
|
long |
getLastCommitTime()
The commit time associated with this message.
|
long |
getQuorumToken()
The quorum token for which this message is valid.
|
int |
getReplicationFactor()
The replication factor for the quorum leader.
|
long |
getSequence()
The write cache buffer sequence number (reset to ZERO (0) for the first
message after each commit and incremented for each buffer sent by the
leader).
|
StoreTypeEnum |
getStoreType()
The type of backing store (RW or WORM).
|
UUID |
getUUID()
The
UUID of the store to which this message belongs. |
static boolean |
isDataCompressed()
Static method to indicate whether the message will reference
compressed data.
|
void |
readExternal(ObjectInput in) |
String |
toString() |
void |
writeExternal(ObjectOutput out) |
getChk, getSize, hashCode
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getChk, getSize
public HAWriteMessage()
public HAWriteMessage(UUID uuid, long commitCounter, long commitTime, long sequence, int sze, int chk, StoreTypeEnum storeType, long quorumToken, long fileExtent, long firstOffset)
uuid
- The UUID
associated with the backing store on the
leader. This can be used to decide whether the message is for
a given store, or (conversly) whether the receiver has already
setup its root blocks based on the leader (and hence has the
correct UUID
for its local store).commitCounter
- The commit counter for the current root block for the write
set which is being replicated by this message.commitTime
- The commit time for the current root block for the write set
which is being replicated by this message.sequence
- The write cache block sequence number. This is reset to ZERO
(0) for the first replicated write cache block in each write
set.sze
- The #of bytes in the payload.chk
- The checksum of the payload.storeType
- The type of backing store (RW or WORM).quorumToken
- The quorum token for which this message is valid.fileExtent
- The length of the backing file on the disk.firstOffset
- The file offset at which the data will be written (WORM only).public HAWriteMessage(UUID uuid, long commitCounter, long commitTime, long sequence, int sze, int chk, StoreTypeEnum storeType, long quorumToken, int replicationFactor, long fileExtent, long firstOffset, String compressorKey)
uuid
- The UUID
associated with the backing store on the
leader. This can be used to decide whether the message is for
a given store, or (conversly) whether the receiver has already
setup its root blocks based on the leader (and hence has the
correct UUID
for its local store).commitCounter
- The commit counter for the current root block for the write
set which is being replicated by this message.commitTime
- The commit time for the current root block for the write set
which is being replicated by this message.sequence
- The write cache block sequence number. This is reset to ZERO
(0) for the first replicated write cache block in each write
set.sze
- The #of bytes in the payload.chk
- The checksum of the payload.storeType
- The type of backing store (RW or WORM).quorumToken
- The quorum token for which this message is valid.replicationFactor
- The replication factor in effect for the leader.fileExtent
- The length of the backing file on the disk.firstOffset
- The file offset at which the data will be written (WORM only).compressorKey
- The key under which an IRecordCompressor
has been
registered against the CompressorRegistry
-or-
null
for no compression.public UUID getUUID()
IHAWriteMessage
UUID
of the store to which this message belongs.getUUID
in interface IHAWriteMessage
public long getCommitCounter()
IHAWriteMessage
getCommitCounter
in interface IHAWriteMessage
public long getLastCommitTime()
IHAWriteMessage
getLastCommitTime
in interface IHAWriteMessage
public long getSequence()
IHAWriteMessage
getSequence
in interface IHAWriteMessage
public StoreTypeEnum getStoreType()
IHAWriteMessage
getStoreType
in interface IHAWriteMessage
public long getQuorumToken()
IHAWriteMessage
getQuorumToken
in interface IHAWriteMessage
public int getReplicationFactor()
IHAWriteMessage
getReplicationFactor
in interface IHAWriteMessage
public long getFileExtent()
IHAWriteMessage
getFileExtent
in interface IHAWriteMessage
public long getFirstOffset()
IHAWriteMessage
getFirstOffset
in interface IHAWriteMessage
public String getCompressorKey()
IHAWriteMessage
IRecordCompressor
key (if any).getCompressorKey
in interface IHAWriteMessage
public String toString()
toString
in class HAWriteMessageBase
public static boolean isDataCompressed()
public boolean equals(Object obj)
equals
in class HAWriteMessageBase
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class HAWriteMessageBase
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class HAWriteMessageBase
IOException
public ByteBuffer expand(ByteBuffer buffer)
IHAWriteMessage
IRecordCompressor
(if any) to decompress the
dataexpand
in interface IHAWriteMessage
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.