public class JournalTransaction extends Object
Constructor and Description |
---|
JournalTransaction(long id,
JournalRecordProvider journal) |
Modifier and Type | Method and Description |
---|---|
void |
addNegative(JournalFile file,
long id) |
void |
addPositive(JournalFile file,
long id,
int size) |
void |
checkErrorCondition() |
void |
clear() |
void |
commit(JournalFile file)
The caller of this method needs to guarantee appendLock.lock at the journal.
|
void |
fillNumberOfRecords(JournalFile currentFile,
JournalInternalRecord data) |
void |
forget()
Used by load, when the transaction was not loaded correctly
|
TransactionCallback |
getCallback(JournalFile file) |
int |
getCounter(JournalFile file) |
TransactionCallback |
getCurrentCallback() |
long |
getId() |
long[] |
getPositiveArray() |
void |
incCounter(JournalFile file) |
void |
merge(JournalTransaction other)
This is used to merge transactions from compacting
|
void |
prepare(JournalFile file)
The caller of this method needs to guarantee appendLock.lock before calling this method if being used outside of the lock context.
|
void |
replaceRecordProvider(JournalRecordProvider provider) |
void |
rollback(JournalFile file)
The caller of this method needs to guarantee appendLock.lock before calling this method if being used outside of the lock context.
|
void |
setCompacting() |
String |
toString() |
void |
waitCallbacks() |
void |
waitCompletion()
Wait completion at the latest file only
|
public JournalTransaction(long id, JournalRecordProvider journal)
public void replaceRecordProvider(JournalRecordProvider provider)
public long getId()
public int getCounter(JournalFile file)
public void incCounter(JournalFile file)
public long[] getPositiveArray()
public void setCompacting()
public void merge(JournalTransaction other)
public void clear()
public void fillNumberOfRecords(JournalFile currentFile, JournalInternalRecord data)
currentFile
- data
- public TransactionCallback getCurrentCallback()
public TransactionCallback getCallback(JournalFile file) throws Exception
Exception
public void addPositive(JournalFile file, long id, int size)
public void addNegative(JournalFile file, long id)
public void commit(JournalFile file)
public void waitCallbacks() throws InterruptedException
InterruptedException
public void waitCompletion() throws Exception
Exception
public void rollback(JournalFile file)
public void prepare(JournalFile file)
public void forget()
Copyright © 2017 JBoss by Red Hat. All rights reserved.