Class AbstractJournalOperation
- java.lang.Object
-
- net.timewalker.ffmq4.storage.data.impl.journal.AbstractJournalOperation
-
- Direct Known Subclasses:
AbstractJournalWriteOperation,CommitOperation,StoreExtendOperation
public abstract class AbstractJournalOperation extends Object
Base class for a Journal operation
-
-
Field Summary
Fields Modifier and Type Field Description static byteTYPE_COMMITstatic byteTYPE_DATA_BLOCK_WRITEstatic byteTYPE_META_DATA_BLOCK_WRITEstatic byteTYPE_META_DATA_WRITEstatic byteTYPE_STORE_EXTEND
-
Constructor Summary
Constructors Constructor Description AbstractJournalOperation(long transactionId, byte type)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetTransactionId()bytegetType()AbstractJournalOperationnext()voidsetNext(AbstractJournalOperation next)intsize()The storage size for this operationStringtoString()protected voidwriteTo(JournalFile journalFile)Write the operation to the given journal file
-
-
-
Field Detail
-
TYPE_DATA_BLOCK_WRITE
public static final byte TYPE_DATA_BLOCK_WRITE
- See Also:
- Constant Field Values
-
TYPE_META_DATA_WRITE
public static final byte TYPE_META_DATA_WRITE
- See Also:
- Constant Field Values
-
TYPE_META_DATA_BLOCK_WRITE
public static final byte TYPE_META_DATA_BLOCK_WRITE
- See Also:
- Constant Field Values
-
TYPE_STORE_EXTEND
public static final byte TYPE_STORE_EXTEND
- See Also:
- Constant Field Values
-
TYPE_COMMIT
public static final byte TYPE_COMMIT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getTransactionId
public long getTransactionId()
- Returns:
- the transactionId
-
getType
public final byte getType()
- Returns:
- the type
-
size
public int size()
The storage size for this operation
-
writeTo
protected void writeTo(JournalFile journalFile) throws JournalException
Write the operation to the given journal file- Parameters:
journalFile- teh journal file- Throws:
JournalException
-
next
public AbstractJournalOperation next()
-
setNext
public void setNext(AbstractJournalOperation next)
-
-