| 限定符和类型 | 字段和说明 |
|---|---|
static ByteBuffer |
EMPTY_DATA |
| 构造器和说明 |
|---|
LogEntry() |
LogEntry(EnumOutter.EntryType type) |
| 限定符和类型 | 方法和说明 |
|---|---|
long |
checksum()
Calculate a checksum value for this entity.
|
boolean |
decode(byte[] content)
已过时。
|
byte[] |
encode()
已过时。
|
boolean |
equals(Object obj) |
long |
getChecksum()
Returns the checksum of the log entry.
|
ByteBuffer |
getData() |
LogId |
getId() |
List<PeerId> |
getLearners() |
List<PeerId> |
getOldLearners() |
List<PeerId> |
getOldPeers() |
List<PeerId> |
getPeers() |
EnumOutter.EntryType |
getType() |
boolean |
hasChecksum()
Returns whether the log entry has a checksum.
|
int |
hashCode() |
boolean |
hasLearners() |
boolean |
isCorrupted()
Returns true when the log entry is corrupted, it means that the checksum is mismatch.
|
void |
setChecksum(long checksum) |
void |
setData(ByteBuffer data) |
void |
setId(LogId id) |
void |
setLearners(List<PeerId> learners) |
void |
setOldLearners(List<PeerId> oldLearners) |
void |
setOldPeers(List<PeerId> oldPeers) |
void |
setPeers(List<PeerId> peers) |
void |
setType(EnumOutter.EntryType type) |
String |
toString() |
public static final ByteBuffer EMPTY_DATA
public LogEntry()
public LogEntry(EnumOutter.EntryType type)
public boolean hasLearners()
public long checksum()
Checksum@Deprecated public byte[] encode()
LogEntryEncoder instead.@Deprecated public boolean decode(byte[] content)
LogEntryDecoder instead.public boolean hasChecksum()
public boolean isCorrupted()
public long getChecksum()
hasChecksum to check if
it has checksum.public void setChecksum(long checksum)
public EnumOutter.EntryType getType()
public void setType(EnumOutter.EntryType type)
public LogId getId()
public void setId(LogId id)
public ByteBuffer getData()
public void setData(ByteBuffer data)
Copyright © 2021. All rights reserved.