Package org.apache.iotdb.db.wal.buffer
Class WALEntry
- java.lang.Object
-
- org.apache.iotdb.db.wal.buffer.WALEntry
-
- All Implemented Interfaces:
SerializedSize
- Direct Known Subclasses:
WALInfoEntry,WALSignalEntry
public abstract class WALEntry extends java.lang.Object implements SerializedSize
WALEntry is the basic element of .wal file, including type, memTable id, and specific value(physical plan or memTable snapshot).
-
-
Field Summary
Fields Modifier and Type Field Description protected longmemTableIdmemTable idprotected WALEntryTypetypetype of valueprotected WALEntryValuevaluevalue(physical plan or memTable snapshot)protected WALFlushListenerwalFlushListenerlisten whether this WALEntry has been written to the filesystem, null iff this WALEntry is deserialized from .wal file
-
Constructor Summary
Constructors Modifier Constructor Description WALEntry(long memTableId, WALEntryValue value, boolean wait)protectedWALEntry(WALEntryType type, long memTableId, WALEntryValue value, boolean wait)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static WALEntrydeserialize(java.io.DataInputStream stream)static PlanNodedeserializeForConsensus(java.nio.ByteBuffer buffer)This deserialization method is only for multi-leader consensus and just deserializes InsertRowNode and InsertTabletNodebooleanequals(java.lang.Object obj)longgetMemTableId()WALEntryTypegetType()WALEntryValuegetValue()WALFlushListenergetWalFlushListener()abstract booleanisSignal()abstract voidserialize(IWALByteBufferView buffer)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.iotdb.db.utils.SerializedSize
serializedSize
-
-
-
-
Field Detail
-
type
protected final WALEntryType type
type of value
-
memTableId
protected final long memTableId
memTable id
-
value
protected final WALEntryValue value
value(physical plan or memTable snapshot)
-
walFlushListener
protected final WALFlushListener walFlushListener
listen whether this WALEntry has been written to the filesystem, null iff this WALEntry is deserialized from .wal file
-
-
Constructor Detail
-
WALEntry
public WALEntry(long memTableId, WALEntryValue value, boolean wait)
-
WALEntry
protected WALEntry(WALEntryType type, long memTableId, WALEntryValue value, boolean wait)
-
-
Method Detail
-
serialize
public abstract void serialize(IWALByteBufferView buffer)
-
deserialize
public static WALEntry deserialize(java.io.DataInputStream stream) throws org.apache.iotdb.commons.exception.IllegalPathException, java.io.IOException
- Throws:
org.apache.iotdb.commons.exception.IllegalPathExceptionjava.io.IOException
-
deserializeForConsensus
public static PlanNode deserializeForConsensus(java.nio.ByteBuffer buffer)
This deserialization method is only for multi-leader consensus and just deserializes InsertRowNode and InsertTabletNode
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
getType
public WALEntryType getType()
-
getMemTableId
public long getMemTableId()
-
getValue
public WALEntryValue getValue()
-
getWalFlushListener
public WALFlushListener getWalFlushListener()
-
isSignal
public abstract boolean isSignal()
-
-