http://git-wip-us.apache.org/repos/asf/incubator-tephra/blob/4e1e5e9a/src/site/resources/apidocs-0.13.0-incubating/org/apache/tephra/TransactionManager.html ---------------------------------------------------------------------- diff --git a/src/site/resources/apidocs-0.13.0-incubating/org/apache/tephra/TransactionManager.html b/src/site/resources/apidocs-0.13.0-incubating/org/apache/tephra/TransactionManager.html new file mode 100644 index 0000000..d6cf8ea --- /dev/null +++ b/src/site/resources/apidocs-0.13.0-incubating/org/apache/tephra/TransactionManager.html @@ -0,0 +1,840 @@ + + + +
+ + +public class TransactionManager
+extends com.google.common.util.concurrent.AbstractService
+Modifier and Type | +Class and Description | +
---|---|
static class |
+TransactionManager.ChangeSet
+Represents a set of changes from a client.
+ |
+
static class |
+TransactionManager.InProgressTx
+Represents some of the info on in-progress tx
+ |
+
static class |
+TransactionManager.InProgressType
+Type of in-progress transaction.
+ |
+
com.google.common.util.concurrent.Service.Listener, com.google.common.util.concurrent.Service.State
Constructor and Description | +
---|
TransactionManager(org.apache.hadoop.conf.Configuration config) |
+
TransactionManager(org.apache.hadoop.conf.Configuration conf,
+ TransactionStateStorage persistor,
+ MetricsCollector txMetricsCollector) |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+abort(Transaction tx) |
+
void |
+canCommit(long txId,
+ Collection<byte[]> changeIds) |
+
Transaction |
+checkpoint(Transaction originalTx) |
+
void |
+commit(long txId,
+ long writePointer) |
+
void |
+doStart() |
+
void |
+doStop() |
+
TransactionSnapshot |
+getCurrentState() |
+
int |
+getExcludedListSize() |
+
int |
+getInvalidSize() |
+
TransactionSnapshot |
+getSnapshot() |
+
TransactionStateStorage |
+getTransactionStateStorage() |
+
static long |
+getTxExpirationFromWritePointer(long writePointer,
+ long timeoutInSeconds) |
+
boolean |
+invalidate(long tx) |
+
void |
+logStatistics()
+Called from the tx service every 10 seconds.
+ |
+
void |
+recoverState() |
+
void |
+resetState()
+Resets the state of the transaction manager.
+ |
+
Transaction |
+startLong()
+Start a long transaction.
+ |
+
Transaction |
+startLong(String clientId)
+Starts a long transaction with a client id.
+ |
+
Transaction |
+startShort()
+Start a short transaction with the default timeout.
+ |
+
Transaction |
+startShort(int timeoutInSeconds)
+Start a short transaction with a given timeout.
+ |
+
Transaction |
+startShort(String clientId)
+Start a short transaction with a client id and default timeout.
+ |
+
Transaction |
+startShort(String clientId,
+ int timeoutInSeconds)
+Start a short transaction with a given timeout.
+ |
+
boolean |
+takeSnapshot(OutputStream out)
+Take a snapshot of the transaction state and serialize it into the given output stream.
+ |
+
boolean |
+truncateInvalidTx(Set<Long> invalidTxIds)
+Removes the given transaction ids from the invalid list.
+ |
+
boolean |
+truncateInvalidTxBefore(long time)
+Removes all transaction ids started before the given time from invalid list.
+ |
+
static Map<Long,TransactionManager.InProgressTx> |
+txnBackwardsCompatCheck(int defaultLongTimeout,
+ long longTimeoutTolerance,
+ Map<Long,TransactionManager.InProgressTx> inProgress)
+Check if in-progress transactions need to be migrated to have expiration time and type, if so do the migration.
+ |
+
addListener, isRunning, notifyFailed, notifyStarted, notifyStopped, start, startAndWait, state, stop, stopAndWait, toString
public TransactionManager(org.apache.hadoop.conf.Configuration config)+
@Inject +public TransactionManager(org.apache.hadoop.conf.Configuration conf, + @Nonnull + TransactionStateStorage persistor, + MetricsCollector txMetricsCollector)+
public void doStart()+
doStart
in class com.google.common.util.concurrent.AbstractService
public TransactionSnapshot getSnapshot() + throws IOException+
IOException
public boolean takeSnapshot(OutputStream out) + throws IOException+
IOException
public TransactionSnapshot getCurrentState()+
public void recoverState()+
public static Map<Long,TransactionManager.InProgressTx> txnBackwardsCompatCheck(int defaultLongTimeout, + long longTimeoutTolerance, + Map<Long,TransactionManager.InProgressTx> inProgress)+
public void resetState()+
public void doStop()+
doStop
in class com.google.common.util.concurrent.AbstractService
public Transaction startShort()+
public Transaction startShort(String clientId)+
clientId
- id of the client requesting a transaction.public Transaction startShort(int timeoutInSeconds)+
timeoutInSeconds
- the time out period in seconds.public Transaction startShort(String clientId, + int timeoutInSeconds)+
clientId
- id of the client requesting a transaction.timeoutInSeconds
- the time out period in seconds.public static long getTxExpirationFromWritePointer(long writePointer, + long timeoutInSeconds)+
public Transaction startLong()+
public Transaction startLong(String clientId)+
public void canCommit(long txId, + Collection<byte[]> changeIds) + throws TransactionNotInProgressException, + TransactionSizeException, + TransactionConflictException+ +
public void commit(long txId, + long writePointer) + throws TransactionNotInProgressException, + TransactionConflictException+ +
public void abort(Transaction tx)+
public boolean invalidate(long tx)+
public boolean truncateInvalidTx(Set<Long> invalidTxIds)+
invalidTxIds
- transaction idspublic boolean truncateInvalidTxBefore(long time) + throws InvalidTruncateTimeException+
time
- time in millisecondsInvalidTruncateTimeException
- if there are any in-progress transactions started before given timepublic Transaction checkpoint(Transaction originalTx) + throws TransactionNotInProgressException+
TransactionNotInProgressException
public int getExcludedListSize()+
public int getInvalidSize()+
public void logStatistics()+
public TransactionStateStorage getTransactionStateStorage()+
Copyright © 2017 The Apache Software Foundation. All rights reserved.
+ + http://git-wip-us.apache.org/repos/asf/incubator-tephra/blob/4e1e5e9a/src/site/resources/apidocs-0.13.0-incubating/org/apache/tephra/TransactionNotInProgressException.html ---------------------------------------------------------------------- diff --git a/src/site/resources/apidocs-0.13.0-incubating/org/apache/tephra/TransactionNotInProgressException.html b/src/site/resources/apidocs-0.13.0-incubating/org/apache/tephra/TransactionNotInProgressException.html new file mode 100644 index 0000000..0121395 --- /dev/null +++ b/src/site/resources/apidocs-0.13.0-incubating/org/apache/tephra/TransactionNotInProgressException.html @@ -0,0 +1,270 @@ + + + + + + +public class TransactionNotInProgressException +extends TransactionFailureException+
Constructor and Description | +
---|
TransactionNotInProgressException(String message) |
+
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Copyright © 2017 The Apache Software Foundation. All rights reserved.
+ + http://git-wip-us.apache.org/repos/asf/incubator-tephra/blob/4e1e5e9a/src/site/resources/apidocs-0.13.0-incubating/org/apache/tephra/TransactionServiceMain.html ---------------------------------------------------------------------- diff --git a/src/site/resources/apidocs-0.13.0-incubating/org/apache/tephra/TransactionServiceMain.html b/src/site/resources/apidocs-0.13.0-incubating/org/apache/tephra/TransactionServiceMain.html new file mode 100644 index 0000000..59a012e --- /dev/null +++ b/src/site/resources/apidocs-0.13.0-incubating/org/apache/tephra/TransactionServiceMain.html @@ -0,0 +1,382 @@ + + + + + + +public class TransactionServiceMain +extends Object+
Constructor and Description | +
---|
TransactionServiceMain() |
+
TransactionServiceMain(org.apache.hadoop.conf.Configuration conf) |
+
Modifier and Type | +Method and Description | +
---|---|
void |
+destroy()
+Invoked by jsvc for resource cleanup.
+ |
+
void |
+doMain(String[] args)
+The main method.
+ |
+
void |
+init(String[] args)
+Invoked by jsvc to initialize the program.
+ |
+
static void |
+main(String[] args) |
+
void |
+start()
+Invoked by jsvc to start the program.
+ |
+
void |
+stop()
+Invoked by jsvc to stop the program.
+ |
+
public TransactionServiceMain()+
public TransactionServiceMain(org.apache.hadoop.conf.Configuration conf)+
public void doMain(String[] args) + throws Exception+
Exception
public void init(String[] args)+
public void start() + throws Exception+
Exception
public void stop()+
public void destroy()+
Copyright © 2017 The Apache Software Foundation. All rights reserved.
+ +