K - The type for the KeyV - The type for the stored valuepublic class ReadTransaction<K,V>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private BTreeHeader<K,V> |
btreeHeader
The associated B-tree header
|
private boolean |
closed
A flag used to tell if a transaction is closed or not
|
private long |
creationDate
The date of creation
|
private java.util.concurrent.ConcurrentLinkedQueue<ReadTransaction<K,V>> |
readTransactions
The list of read transactions being executed
|
private RecordManager |
recordManager
The reference to the recordManager, if any
|
private long |
revision
The associated revision
|
| Constructor and Description |
|---|
ReadTransaction(BTreeHeader<K,V> btreeHeader,
java.util.concurrent.ConcurrentLinkedQueue<ReadTransaction<K,V>> readTransactions)
Creates a new transaction instance
|
ReadTransaction(RecordManager recordManager,
BTreeHeader<K,V> btreeHeader,
java.util.concurrent.ConcurrentLinkedQueue<ReadTransaction<K,V>> readTransactions)
Creates a new transaction instance
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the transaction, releasing the revision it was using.
|
BTreeHeader<K,V> |
getBtreeHeader() |
long |
getCreationDate() |
long |
getRevision() |
boolean |
isClosed() |
java.lang.String |
toString() |
private long revision
private long creationDate
private BTreeHeader<K,V> btreeHeader
private volatile boolean closed
private java.util.concurrent.ConcurrentLinkedQueue<ReadTransaction<K,V>> readTransactions
private RecordManager recordManager
public ReadTransaction(RecordManager recordManager, BTreeHeader<K,V> btreeHeader, java.util.concurrent.ConcurrentLinkedQueue<ReadTransaction<K,V>> readTransactions)
btreeHeader - The BtreeHeader we will use for this read transactionpublic ReadTransaction(BTreeHeader<K,V> btreeHeader, java.util.concurrent.ConcurrentLinkedQueue<ReadTransaction<K,V>> readTransactions)
btreeHeader - The BtreeHeader we will use for this read transactionpublic long getRevision()
public long getCreationDate()
public BTreeHeader<K,V> getBtreeHeader()
public void close()
public boolean isClosed()
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()