|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface TransactionFactoryBuilder<T extends Transaction,B extends TransactionFactoryBuilder>
An implementation of the builder design pattern to createReference a TransactionFactory. This is the place
to be for transaction configuration. This approach also gives the freedom to access implementation specific
setters by implementing and extending the TransactionFactoryBuilder interface.
| Method Summary | |
|---|---|
TransactionFactory<T> |
build()
Builds a TransactionFactory with the provided configuration. |
BackoffPolicy |
getBackoffPolicy()
Return the BackoffPolicy used. |
CommitLockPolicy |
getCommitLockPolicy()
Returns the CommitLockPolicy |
String |
getFamilyName()
Returns the family name of the transaction. |
int |
getMaxReadSpinCount()
Returns the maximum number of spins that should be executed when a transactional object can't be read because it is locked. |
int |
getMaxRetries()
Returns the maximum number of times a transaction can be retried. |
PropagationLevel |
getPropagationLevel()
Gets the PropagationLevel. |
Stm |
getStm()
Returns the Stm that created this TransactionFactoryBuilder. |
long |
getTimeoutNs()
Returns the timeout. |
TraceLevel |
getTraceLevel()
Gets the TraceLevel. |
boolean |
isDirtyCheckEnabled()
Checks if dirty check is enabled. |
boolean |
isExplicitRetryAllowed()
Checks if explicit retry (for blocking operations) is allowed. |
boolean |
isInterruptible()
Checks if the transaction is interruptible. |
boolean |
isQuickReleaseEnabled()
Checks if quick release of locks while committing is enabled. |
boolean |
isReadonly()
Checks if the transaction is readonly or an update. |
boolean |
isReadTrackingEnabled()
Checks if the transaction automatically tracks reads. |
boolean |
isSpeculativeConfigurationEnabled()
Checks if speculative configuration is enabled. |
boolean |
isWriteSkewAllowed()
Checks if the writeskew problem is allowed to happen. |
B |
setBackoffPolicy(BackoffPolicy backoffPolicy)
Sets the new backoff policy. |
B |
setCommitLockPolicy(CommitLockPolicy commitLockPolicy)
Sets the CommitLockPolicy. |
B |
setDirtyCheckEnabled(boolean dirtyCheckEnabled)
Sets id the dirty check is enabled. |
B |
setExplicitRetryAllowed(boolean explicitRetryEnabled)
Sets if the Transaction is allowed to do an explicit retry (needed for a blocking operation). |
B |
setFamilyName(String familyName)
Sets the transaction familyname. |
B |
setInterruptible(boolean interruptible)
Sets if the transaction can be interrupted while doing blocking operations. |
B |
setMaxReadSpinCount(int maxReadSpinCount)
Sets the maximum number of spins that should be executed when a transactional object can't be read because it is locked. |
B |
setMaxRetries(int maxRetries)
Sets the the maximum count a transaction can be retried. |
B |
setPropagationLevel(PropagationLevel level)
Sets the TransactionPropagationLevel. |
B |
setQuickReleaseEnabled(boolean enabled)
Sets enabling quick release on locks is enabled. |
B |
setReadonly(boolean readonly)
Sets the readonly property on a transaction. |
B |
setReadTrackingEnabled(boolean enabled)
Sets if the transaction should automatically track all reads that have been done. |
B |
setSpeculativeConfigurationEnabled(boolean newValue)
With the speculative configuration enabled, the stm is allowed to determine optimal settings for transactions. |
B |
setTimeoutNs(long timeoutNs)
Sets the timeout (the maximum time a transaction is allowed to block. |
B |
setTraceLevel(TraceLevel traceLevel)
Sets the TraceLevel. |
B |
setWriteSkewAllowed(boolean allowWriteSkew)
If writeskew problem is allowed to happen. |
| Method Detail |
|---|
Stm getStm()
PropagationLevel getPropagationLevel()
B setPropagationLevel(PropagationLevel level)
level - the new PropagationLevel.
NullPointerException - if level is null.B setTraceLevel(TraceLevel traceLevel)
traceLevel - the new traceLevel.
NullPointerException - if traceLevel is null.getTraceLevel()TraceLevel getTraceLevel()
setTraceLevel(TraceLevel)boolean isDirtyCheckEnabled()
setDirtyCheckEnabled(boolean)B setDirtyCheckEnabled(boolean dirtyCheckEnabled)
dirtyCheckEnabled - true if dirty check should be executed, false otherwise.
isDirtyCheckEnabled()B setExplicitRetryAllowed(boolean explicitRetryEnabled)
explicitRetryEnabled - true if explicit retry is enabled, false otherwise.
isExplicitRetryAllowed()boolean isExplicitRetryAllowed()
setExplicitRetryAllowed(boolean)B setFamilyName(String familyName)
familyName - the familyName of the transaction.
getFamilyName()String getFamilyName()
setFamilyName(String)B setReadonly(boolean readonly)
readonly - true if the transaction should be readonly, false otherwise.
isReadonly()boolean isReadonly()
setReadonly(boolean)B setReadTrackingEnabled(boolean enabled)
enabled - true if read tracking enabled, false otherwise.
isQuickReleaseEnabled()boolean isReadTrackingEnabled()
setReadTrackingEnabled(boolean)B setInterruptible(boolean interruptible)
interruptible - if the transaction can be interrupted while doing blocking operations.
isInterruptible()boolean isInterruptible()
setInterruptible(boolean)B setCommitLockPolicy(CommitLockPolicy commitLockPolicy)
commitLockPolicy - the new CommitLockPolicy
NullPointerException - if commitLockPolicy is null.getCommitLockPolicy()CommitLockPolicy getCommitLockPolicy()
B setSpeculativeConfigurationEnabled(boolean newValue)
newValue - indicates if speculative configuration should be enabled.
isSpeculativeConfigurationEnabled()boolean isSpeculativeConfigurationEnabled()
setSpeculativeConfigurationEnabled(boolean)B setWriteSkewAllowed(boolean allowWriteSkew)
allowWriteSkew - indicates if writeSkew problem is allowed.
isWriteSkewAllowed()boolean isWriteSkewAllowed()
setWriteSkewAllowed(boolean)B setQuickReleaseEnabled(boolean enabled)
enabled - true if the lock of a transaction object should be releases as soon as possible instead
of waiting for the whole transaction to commit.
isQuickReleaseEnabled()boolean isQuickReleaseEnabled()
setQuickReleaseEnabled(boolean)B setBackoffPolicy(BackoffPolicy backoffPolicy)
BackoffPolicy for more information.
backoffPolicy - the backoff policy to use.
NullPointerException - if backoffPolicy is null.getBackoffPolicy()BackoffPolicy getBackoffPolicy()
setBackoffPolicy(org.multiverse.api.backoff.BackoffPolicy)B setTimeoutNs(long timeoutNs)
timeoutNs - the timeout specified in nano seconds
long getTimeoutNs()
setTimeoutNs(long)B setMaxRetries(int maxRetries)
maxRetries - the maximum number of times a transaction can be tried.
IllegalArgumentException - if retryCount smaller than 0.int getMaxRetries()
B setMaxReadSpinCount(int maxReadSpinCount)
maxReadSpinCount - the maximum number of spins.
IllegalArgumentException - if smaller than 0.getMaxReadSpinCount()int getMaxReadSpinCount()
setMaxReadSpinCount(int)TransactionFactory<T> build()
TransactionFactory with the provided configuration.
IllegalStateException - if this TransactionFactoryBuilder is not configured correctly and therefor the
TransactionFactory can't be created.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||