|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Class that represents the storage environment of an application. An environment is formed of one storage controller and zero, one or more storage managers. Storage controller coordinates transactions and storage schema, while storage managers perform storage operations.
A StorageEnvironment
instance holds references (local or
remote) to application's storage controller and storage manager. If
application is local only one storage manger will run and
startLocal()
method should be used. If application is
distributed along various nodes StorageEnvironment
instances will
hold references to application's storage controller and local node's storage
manager. startLocalShared(String appName)
method starts both controller and manager and references hold by
StorageEnvironment
instance are local.
startDistributed(String host, String appName)
starts a manager in the current node (local reference) and points to
application's controller run host
's node. Optionally local node
may run only application's controller, started by
startDistributed(String appName)
.
Configuration files manager.properties
and
controller.properties
are used to load configuration
properties. These files must be at application's current directory.
stop()
method will stop entire application if this
StorageEnvironment
instance started application's controller or
only current node's manager otherwise.
StorageController
,
StorageManager
Method Summary | |
java.lang.String |
getApplicationName()
Return application's name. |
StorageController |
getController()
Returns applications's storage controller. |
StorageManager |
getManager()
Returns local node's storage manager. |
void |
startDistributed(java.lang.String appName)
Starts a storage controller in the current JVM and binds it to local node's object registry, so that it become available to other nodes. |
void |
startDistributed(java.lang.String host,
java.lang.String appName)
Starts a storage manager and points to a storage controller bound to a specific host's object registry. |
void |
startLocal()
Starts a storage manager and a storage controller in the current JVM. |
void |
startLocalShared(java.lang.String appName)
Starts a storage manager and a storage controller in the current JVM, but binds controller to local node's object registry, so that it become available to other nodes. |
void |
stop()
Stops either a storage controller or a storage manager. |
Method Detail |
public void startLocal() throws StorageException
StorageException
public void startLocalShared(java.lang.String appName) throws StorageException
appName
- Application's name.
StorageException
public void startDistributed(java.lang.String host, java.lang.String appName) throws StorageException
host
- Node that hosts object registry to which controller is
bound.appName
- Application's name.
StorageException
public void startDistributed(java.lang.String appName) throws StorageException
appName
- Application's name.
StorageException
public void stop() throws StorageException
StorageException
public StorageController getController()
public StorageManager getManager()
public java.lang.String getApplicationName()
null
if applications is local.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |