public class JdbmPartitionWriteTxn extends PartitionWriteTxn
Constructor and Description |
---|
JdbmPartitionWriteTxn(jdbm.RecordManager recordManager,
boolean syncOnWrite)
Create an instance of JdbmPartitionWriteTxn
|
Modifier and Type | Method and Description |
---|---|
void |
abort()
Abort a transaction.
|
void |
close()
Commit the transaction.
|
void |
commit()
Commit a write transaction.
|
boolean |
isClosed()
Tells if the transaction has been committed/aborted or not.
|
public JdbmPartitionWriteTxn(jdbm.RecordManager recordManager, boolean syncOnWrite)
recordManager
- The RecordManager instancesyncOnWrite
- If we want to data to be flushed on each writepublic void commit() throws IOException
commit
in interface PartitionTxn
commit
in class PartitionWriteTxn
IOException
- If the commit failedpublic void abort() throws IOException
PartitionReadTxn
, it will unlink this transaction
from the version it used. If it's a PartitionWriteTxn
; it will drop all the pending
changes. The latest version will remain the same.abort
in interface PartitionTxn
abort
in class PartitionWriteTxn
IOException
- If the abort failedpublic boolean isClosed()
isClosed
in interface PartitionTxn
isClosed
in class PartitionWriteTxn
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface PartitionTxn
close
in class PartitionWriteTxn
IOException
Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.