public class TXUtils extends java.lang.Object implements Transactor
| Constructor and Description |
|---|
TXUtils() |
| Modifier and Type | Method and Description |
|---|---|
protected static GigaPaxosClient<Request> |
getGPClient(AppRequestParser app)
Creates an async gigapaxos client without checking connectivity (because
the reconfigurators may not yet have been initialized.
|
protected TxStateRequest.State |
getTxState(GigaPaxosClient<Request> gpClient,
Transaction tx) |
protected static java.util.Set<java.net.InetSocketAddress> |
requestActiveReplicas(GigaPaxosClient<Request> gpClient,
Transaction tx)
This method fetches the union set of the set of active replica addresses
for all participant groups in a transaction by issuing an async task for
the lock list of the transaction.
|
void |
transact(TXRequest request) |
protected static Request[] |
tryFinishAsyncTasks(GigaPaxosClient<Request> gpClient,
java.util.ArrayList<Request> txRequests) |
protected static Request[] |
tryFinishAsyncTasks(GigaPaxosClient<Request> gpClient,
java.util.ArrayList<Request> txRequests,
int numAttempts)
Blocks and retries in parallel until all of a set of transaction steps
have successfully completed.
|
protected static Request[] tryFinishAsyncTasks(GigaPaxosClient<Request> gpClient, java.util.ArrayList<Request> txRequests)
protected static Request[] tryFinishAsyncTasks(GigaPaxosClient<Request> gpClient, java.util.ArrayList<Request> txRequests, int numAttempts)
gpClient - txRequests - The list of operations comprising the transaction.numAttempts - Maximum number of times each task will be retransmitted before
timing out.txRequests.protected static java.util.Set<java.net.InetSocketAddress> requestActiveReplicas(GigaPaxosClient<Request> gpClient, Transaction tx)
gpClient - tx - protected TxStateRequest.State getTxState(GigaPaxosClient<Request> gpClient, Transaction tx) throws java.io.IOException
java.io.IOExceptionprotected static GigaPaxosClient<Request> getGPClient(AppRequestParser app) throws java.io.IOException
app - java.io.IOExceptionpublic void transact(TXRequest request)
transact in interface Transactor