|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.multiverse.stms.AbstractTransactionConfiguration
public class AbstractTransactionConfiguration
Contains the configuration for the AbstractTransaction.
One advantage of this class is that it is a lot easier to add additional fields without having to change all constructors. It also reduces the need for constructors with a lot of arguments.`
| Field Summary | |
|---|---|
BackoffPolicy |
backoffPolicy
|
PrimitiveClock |
clock
|
boolean |
explicitRetryAllowed
|
String |
familyName
|
boolean |
interruptible
|
int |
maxReadSpinCount
|
int |
maxRetries
|
PropagationLevel |
propagationLevel
|
boolean |
readOnly
|
boolean |
readTrackingEnabled
|
long |
timeoutNs
|
TraceLevel |
traceLevel
|
TransactionFactory |
transactionFactory
|
boolean |
writeSkewAllowed
|
| Constructor Summary | |
|---|---|
AbstractTransactionConfiguration()
This method should be removed, only used for testing purposes. |
|
AbstractTransactionConfiguration(PrimitiveClock clock,
BackoffPolicy backoffPolicy,
String familyName,
boolean readOnly,
int maxRetries,
boolean interruptible,
boolean writeSkewAllowed,
boolean readTrackingEnabled,
boolean explicitRetryAllowed,
long timeoutNs,
int maxReadSpinCount,
TransactionFactory transactionFactory,
TraceLevel traceLevel,
PropagationLevel propagationLevel)
|
|
| Method Summary | |
|---|---|
BackoffPolicy |
getBackoffPolicy()
Returns the BackoffPolicy used by the Stm when a transaction conflicts with another transaction. |
String |
getFamilyName()
Returns the family name of this Transaction. |
int |
getMaxRetries()
Returns the maximum number of times this Transaction be retried before failing. |
PropagationLevel |
getPropagationLevel()
Returns the PropagationLevel. |
long |
getTimeoutNs()
Returns the total timeout in nanoseconds. |
TraceLevel |
getTraceLevel()
Returns the TraceLevel |
boolean |
isExplicitRetryAllowed()
If an explicit retry (so a blocking transaction) is allowed. |
boolean |
isInterruptible()
Checks if the Transaction can be interrupted if it is blocking. |
boolean |
isReadonly()
Checks if this Transaction is readonly. |
boolean |
isReadTrackingEnabled()
Checks if this transaction does automatic read tracking. |
boolean |
isWriteSkewAllowed()
Checks if this Transaction allows writeskew. |
int |
maxReadSpinCount()
Returns the maximum number of times the transaction is allowed to spin on a read to become readable (perhaps it is locked). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final PrimitiveClock clock
public final BackoffPolicy backoffPolicy
public final String familyName
public final boolean readOnly
public final int maxRetries
public final boolean interruptible
public final boolean writeSkewAllowed
public final boolean readTrackingEnabled
public final long timeoutNs
public final boolean explicitRetryAllowed
public final int maxReadSpinCount
public final TransactionFactory transactionFactory
public final TraceLevel traceLevel
public final PropagationLevel propagationLevel
| Constructor Detail |
|---|
public AbstractTransactionConfiguration()
public AbstractTransactionConfiguration(PrimitiveClock clock,
BackoffPolicy backoffPolicy,
String familyName,
boolean readOnly,
int maxRetries,
boolean interruptible,
boolean writeSkewAllowed,
boolean readTrackingEnabled,
boolean explicitRetryAllowed,
long timeoutNs,
int maxReadSpinCount,
TransactionFactory transactionFactory,
TraceLevel traceLevel,
PropagationLevel propagationLevel)
| Method Detail |
|---|
public PropagationLevel getPropagationLevel()
TransactionConfiguration
getPropagationLevel in interface TransactionConfigurationpublic TraceLevel getTraceLevel()
TransactionConfiguration
getTraceLevel in interface TransactionConfigurationpublic int maxReadSpinCount()
TransactionConfiguration
maxReadSpinCount in interface TransactionConfigurationpublic boolean isExplicitRetryAllowed()
TransactionConfiguration
isExplicitRetryAllowed in interface TransactionConfigurationTransactionFactoryBuilder.setExplicitRetryAllowed(boolean)public final String getFamilyName()
TransactionConfiguration
getFamilyName in interface TransactionConfigurationTransactionFactoryBuilder.setFamilyName(String)public final int getMaxRetries()
TransactionConfiguration
getMaxRetries in interface TransactionConfigurationTransactionFactoryBuilder.setMaxRetries(int)public final boolean isInterruptible()
TransactionConfiguration
isInterruptible in interface TransactionConfigurationTransactionFactoryBuilder.setInterruptible(boolean)public final boolean isReadonly()
TransactionConfiguration
isReadonly in interface TransactionConfigurationTransactionFactoryBuilder.setReadonly(boolean)public final boolean isWriteSkewAllowed()
TransactionConfiguration
isWriteSkewAllowed in interface TransactionConfigurationTransactionFactoryBuilder.setWriteSkewAllowed(boolean)public final boolean isReadTrackingEnabled()
TransactionConfiguration
isReadTrackingEnabled in interface TransactionConfigurationTransactionFactoryBuilder.setReadTrackingEnabled(boolean)public final BackoffPolicy getBackoffPolicy()
TransactionConfiguration
getBackoffPolicy in interface TransactionConfigurationTransactionFactoryBuilder.setBackoffPolicy(BackoffPolicy)public long getTimeoutNs()
TransactionConfiguration
getTimeoutNs in interface TransactionConfigurationTransactionFactoryBuilder.setTimeoutNs(long)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||