public class PartitionReadTxn extends Object implements PartitionTxn
Constructor and Description |
---|
PartitionReadTxn() |
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 PartitionReadTxn()
public void commit() throws IOException
commit
in interface PartitionTxn
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
IOException
- If the abort failedpublic boolean isClosed()
isClosed
in interface PartitionTxn
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in interface PartitionTxn
IOException
Copyright © 2003–2020 The Apache Software Foundation. All rights reserved.