class PendingTxn extends Object implements Serializable
BackEnd.
As operations are performed under the transaction, they are logged into
this object. When the transaction is committed, each operation is
committed into the DB.| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
PendingTxn.PendingOp
A superclass for the objects that represent pending operations.
|
(package private) static class |
PendingTxn.TakeOp
An object that represents a pending take.
|
(package private) static class |
PendingTxn.WriteOp
An object that represents a pending write.
|
| Modifier and Type | Field and Description |
|---|---|
private long |
id |
private Hashtable |
ops |
private int |
state |
private StoredObject |
transaction |
| Constructor and Description |
|---|
PendingTxn(Long id)
Create a new
PendingTxn for the given id. |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
addTake(byte[] cookie)
Add a new pending
take operation. |
(package private) void |
addWrite(Resource entry)
Add a new pending
write operation. |
(package private) void |
commit(BackEnd processor)
Commit all the operations by invoking the relevant method
on the
processor object. |
boolean |
equals(Object o) |
(package private) Resource |
get(ByteArrayWrapper cookie)
Get a pending write resource.
|
int |
hashCode() |
(package private) void |
prepare(StoredObject tr)
Set the
Transaction object. |
(package private) boolean |
recover(Recover space)
Recover prepared transactions.
|
(package private) Resource |
remove(ByteArrayWrapper cookie)
Remove a pending write.
|
private final long id
private volatile int state
private final Hashtable ops
private volatile StoredObject transaction
PendingTxn(Long id)
PendingTxn for the given id.void addWrite(Resource entry)
write operation.void addTake(byte[] cookie)
take operation.Resource get(ByteArrayWrapper cookie)
Resource remove(ByteArrayWrapper cookie)
boolean recover(Recover space) throws Exception
Exceptionvoid prepare(StoredObject tr)
Transaction object.void commit(BackEnd processor)
processor object.Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.