org.multiverse.api
Class GlobalStmInstance

java.lang.Object
  extended by org.multiverse.api.GlobalStmInstance

public final class GlobalStmInstance
extends Object

A singleton that can be used for easy access to the Stm that is used globally. Once it has been set, it should not be changed while running the system.

Using the GlobalStm imposes some limitations (like 1 global stm instance that is used by everything) but makes the system a lot easier to use. But if the GlobalStm should not be used, but a 'private' stm, you need to carry around the stm reference yourself and just ignore this GlobalStm.

The default implementation is the AlphaStm for now. It can be configured through setting the System property: org.multiverse api GlobalStmInstance.factorymethod. This method should be a no arg static method that returns a Stm instance.

Author:
Peter Veentjer

Method Summary
static Stm getGlobalStmInstance()
          Gets the global Stm instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getGlobalStmInstance

public static Stm getGlobalStmInstance()
Gets the global Stm instance. The returned value will never be null.

Returns:
the global STM instance.


Copyright © 2008-2010 Multiverse. All Rights Reserved.