|
||||||||||
| 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 create 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. |
B |
setAutomaticReadTracking(boolean automaticReadTracking)
If the transaction should automatically track all reads that have been done. |
B |
setBackoffPolicy(BackoffPolicy backoffPolicy)
Sets the new backoff policy. |
B |
setFamilyName(java.lang.String familyName)
Creates a new TransactionFactoryBuilder based on the this TransactionFactoryBuilder but now
configured with the provided familyName. |
B |
setInterruptible(boolean interruptible)
Sets if the transaction can be interrupted while doing blocking operations. |
B |
setMaxRetryCount(int retryCount)
Sets the the maximum count a transaction can be retried. |
B |
setPreventWriteSkew(boolean preventWriteSkew)
If writeskew prevention should be enabled. |
B |
setReadonly(boolean readonly)
Creates a new TransactionFactoryBuilder based on the this TransactionFactoryBuilder but now
configured with the readonly setting. |
B |
setSmartTxLengthSelector(boolean smartTxlengthSelector)
Work around for making sure that on some locations there is a choice for the correct transaction length. |
| Method Detail |
|---|
B setFamilyName(java.lang.String familyName)
TransactionFactoryBuilder based on the this TransactionFactoryBuilder but now
configured with the provided familyName.
The transaction familyName is useful for a lot of reasons. It can be used for identification in logging but also
can be used to make optimizations based on the transaction familyName. A stm could decide to return optimized
transaction implementations for example.
familyName - the familyName of the transaction.
B setReadonly(boolean readonly)
TransactionFactoryBuilder based on the this TransactionFactoryBuilder but now
configured with the readonly setting. A readonly transaction normally is a lot faster than an update
transaction and it also provides protection against unwanted changes.
readonly - true if the transaction should be readonly, false otherwise.
B setAutomaticReadTracking(boolean automaticReadTracking)
automaticReadTracking - true if readtracking enabled, false otherwise.
B setInterruptible(boolean interruptible)
interruptible - if the transaction can be interrupted while doing blocking operations.
B setSmartTxLengthSelector(boolean smartTxlengthSelector)
smartTxlengthSelector - indicates if smartTxlength selection should be used.
B setPreventWriteSkew(boolean preventWriteSkew)
preventWriteSkew - indicates if writeSkews should be prevented.
B setBackoffPolicy(BackoffPolicy backoffPolicy)
BackoffPolicy for more information.
backoffPolicy - the backoff policy to use.
java.lang.NullPointerException - if backoffPolicy is null.B setMaxRetryCount(int retryCount)
retryCount - the maximum number of times a transaction can be tried.
TransactionFactory<T> build()
TransactionFactory with the provided configuration.
java.lang.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 | |||||||||