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, hashCodeclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetChk, getSizepublic 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()
IHAWriteMessageUUID of the store to which this message belongs.getUUID in interface IHAWriteMessagepublic long getCommitCounter()
IHAWriteMessagegetCommitCounter in interface IHAWriteMessagepublic long getLastCommitTime()
IHAWriteMessagegetLastCommitTime in interface IHAWriteMessagepublic long getSequence()
IHAWriteMessagegetSequence in interface IHAWriteMessagepublic StoreTypeEnum getStoreType()
IHAWriteMessagegetStoreType in interface IHAWriteMessagepublic long getQuorumToken()
IHAWriteMessagegetQuorumToken in interface IHAWriteMessagepublic int getReplicationFactor()
IHAWriteMessagegetReplicationFactor in interface IHAWriteMessagepublic long getFileExtent()
IHAWriteMessagegetFileExtent in interface IHAWriteMessagepublic long getFirstOffset()
IHAWriteMessagegetFirstOffset in interface IHAWriteMessagepublic String getCompressorKey()
IHAWriteMessageIRecordCompressor key (if any).getCompressorKey in interface IHAWriteMessagepublic String toString()
toString in class HAWriteMessageBasepublic static boolean isDataCompressed()
public boolean equals(Object obj)
equals in class HAWriteMessageBasepublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class HAWriteMessageBaseIOExceptionClassNotFoundExceptionpublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class HAWriteMessageBaseIOExceptionpublic ByteBuffer expand(ByteBuffer buffer)
IHAWriteMessageIRecordCompressor (if any) to decompress the
dataexpand in interface IHAWriteMessageCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.