T
- buffer typepublic final class Txn<T>
extends java.lang.Object
implements java.lang.AutoCloseable
Modifier and Type | Class and Description |
---|---|
static class |
Txn.BadException
Transaction must abort, has a child, or is invalid.
|
static class |
Txn.BadReaderLockException
Invalid reuse of reader locktable slot.
|
static class |
Txn.EnvIsReadOnly
The proposed R-W transaction is incompatible with a R-O Env.
|
static class |
Txn.IncompatibleParent
The proposed transaction is incompatible with its parent transaction.
|
static class |
Txn.NotReadyException
Transaction is not in a READY state.
|
static class |
Txn.NotResetException
The current transaction has not been reset.
|
static class |
Txn.ReadOnlyRequiredException
The current transaction is not a read-only transaction.
|
static class |
Txn.ReadWriteRequiredException
The current transaction is not a read-write transaction.
|
static class |
Txn.ResetException
The current transaction has already been reset.
|
static class |
Txn.TxFullException
Transaction has too many dirty pages.
|
Modifier and Type | Method and Description |
---|---|
void |
abort()
Aborts this transaction.
|
void |
close()
Closes this transaction by aborting if not already committed.
|
void |
commit()
Commits this transaction.
|
long |
getId()
Return the transaction's ID.
|
Txn<T> |
getParent()
Obtains this transaction's parent.
|
boolean |
isReadOnly()
Whether this transaction is read-only.
|
T |
key()
Fetch the buffer which holds a read-only view of the LMDI allocated memory.
|
void |
renew()
Renews a read-only transaction previously released by
reset() . |
void |
reset()
Aborts this read-only transaction and resets the transaction handle so it
can be reused upon calling
renew() . |
T |
val()
Fetch the buffer which holds a read-only view of the LMDI allocated memory.
|
public void abort()
public void close()
Closing the transaction will invoke
BufferProxy.deallocate(java.lang.Object)
for each read-only buffer
(ie the key and value).
close
in interface java.lang.AutoCloseable
public void commit()
public long getId()
public Txn<T> getParent()
public boolean isReadOnly()
public T key()
public void renew()
reset()
.public void reset()
renew()
.public T val()
Copyright © 2016–2018 The LmdbJava Open Source Project. All rights reserved.