org.multiverse.stms.alpha
Class AlphaStm

java.lang.Object
  extended by org.multiverse.stms.alpha.AlphaStm
All Implemented Interfaces:
org.multiverse.api.Stm<AlphaStm.AlphaTransactionFactoryBuilder,AlphaProgrammaticReferenceFactoryBuilder>

public final class AlphaStm
extends Object
implements org.multiverse.api.Stm<AlphaStm.AlphaTransactionFactoryBuilder,AlphaProgrammaticReferenceFactoryBuilder>

Default Stm implementation that provides the most complete set of features. Like retry/orelse.

It can be configured through the AlphaStmConfig.

Author:
Peter Veentjer.

Nested Class Summary
 class AlphaStm.AlphaTransactionFactoryBuilder
           
 
Constructor Summary
AlphaStm()
          Creates a new AlphaStm with the AlphaStmConfig.createFast as configuration.
AlphaStm(AlphaStmConfig config)
          Creates a new AlphaStm with the provided configuration.
 
Method Summary
static AlphaStm createDebug()
           
static AlphaStm createFast()
           
 org.multiverse.api.commitlock.CommitLockPolicy getAtomicObjectLockPolicy()
          Returns the current WriteSetLockPolicy.
 org.multiverse.api.backoff.BackoffPolicy getBackoffPolicy()
          Returns the current BackoffPolicy.
 org.multiverse.api.clock.PrimitiveClock getClock()
           
 org.multiverse.api.commitlock.CommitLockPolicy getCommitLockPolicy()
           
 int getMaxArraySize()
           
 int getMaxReadSpinCount()
           
 int getMaxRetries()
           
 AlphaProgrammaticReferenceFactoryBuilder getProgrammaticReferenceFactoryBuilder()
           
 AlphaStm.AlphaTransactionFactoryBuilder getTransactionFactoryBuilder()
           
 long getVersion()
           
 boolean isDirtyCheckEnabled()
           
 boolean isOptimizeConflictDetectionEnabled()
           
 boolean isQuickReleaseWriteLocksEnabled()
           
 boolean isSpeculativeConfigEnabled()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AlphaStm

public AlphaStm()
Creates a new AlphaStm with the AlphaStmConfig.createFast as configuration.


AlphaStm

public AlphaStm(AlphaStmConfig config)
Creates a new AlphaStm with the provided configuration.

Parameters:
config - the provided config.
Throws:
NullPointerException - if config is null.
IllegalStateException - if the provided config is invalid.
Method Detail

createFast

public static AlphaStm createFast()

createDebug

public static AlphaStm createDebug()

getTransactionFactoryBuilder

public AlphaStm.AlphaTransactionFactoryBuilder getTransactionFactoryBuilder()
Specified by:
getTransactionFactoryBuilder in interface org.multiverse.api.Stm<AlphaStm.AlphaTransactionFactoryBuilder,AlphaProgrammaticReferenceFactoryBuilder>

getMaxReadSpinCount

public int getMaxReadSpinCount()

getAtomicObjectLockPolicy

public org.multiverse.api.commitlock.CommitLockPolicy getAtomicObjectLockPolicy()
Returns the current WriteSetLockPolicy. Returned value will never be null.

Returns:
the current WriteSetLockPolicy.

getBackoffPolicy

public org.multiverse.api.backoff.BackoffPolicy getBackoffPolicy()
Returns the current BackoffPolicy. Returned value will never be null.

Returns:

getCommitLockPolicy

public org.multiverse.api.commitlock.CommitLockPolicy getCommitLockPolicy()

isDirtyCheckEnabled

public boolean isDirtyCheckEnabled()

getMaxArraySize

public int getMaxArraySize()

getMaxRetries

public int getMaxRetries()

isOptimizeConflictDetectionEnabled

public boolean isOptimizeConflictDetectionEnabled()

isQuickReleaseWriteLocksEnabled

public boolean isQuickReleaseWriteLocksEnabled()

isSpeculativeConfigEnabled

public boolean isSpeculativeConfigEnabled()

getVersion

public long getVersion()
Specified by:
getVersion in interface org.multiverse.api.Stm<AlphaStm.AlphaTransactionFactoryBuilder,AlphaProgrammaticReferenceFactoryBuilder>

getClock

public org.multiverse.api.clock.PrimitiveClock getClock()

getProgrammaticReferenceFactoryBuilder

public AlphaProgrammaticReferenceFactoryBuilder getProgrammaticReferenceFactoryBuilder()
Specified by:
getProgrammaticReferenceFactoryBuilder in interface org.multiverse.api.Stm<AlphaStm.AlphaTransactionFactoryBuilder,AlphaProgrammaticReferenceFactoryBuilder>


Copyright © 2008-2010 Multiverse. All Rights Reserved.