net.sf.jso
Interface StorageController

All Superinterfaces:
java.util.EventListener, LockManager, SchemaManager, java.io.Serializable, StorageListener
All Known Implementing Classes:
JSOStorageController, StorageControllerProxy

public interface StorageController
extends java.io.Serializable, LockManager, SchemaManager, StorageListener

Controller responsible for coordinating storage operations by several concurrent storage managers.


Method Summary
 void addStatusListener(StatusListener listener)
          Starts sending status events to a listener.
 void addStorageListener(StorageListener listener)
          Starts sending storage events to a listener.
 long createId()
          Creates an unique identification within a database.
 java.util.Properties getConfigurationProperties()
          Returns configuration properties.
 ControllerInfo getControllerInfo()
          Gets storage control information.
 int getCurrentCycle()
          Gets current garbage collection cycle.
 PID getCurrentPID()
          Gets current storage partition's identification.
 Status getStatus()
          Gets controller's status.
 boolean isRemote()
          Indicates if controller is running on another JVM.
 void registerManager(StorageManager manager)
          Register a storage manager to receive events.
 void removeStatusListener(StatusListener listener)
          Stops sending status events to a listener.
 void removeStorageListener(StorageListener listener)
          Stops sending storage events to a listener.
 void start()
          Starts the controller.
 void stop()
          Stops the controller.
 void unregisterManager(StorageManager manager)
          Unregister a storage manager to receive events.
 
Methods inherited from interface net.sf.jso.transaction.LockManager
getLockInfo, lock, release
 
Methods inherited from interface net.sf.jso.schema.SchemaManager
addSchemaListener, createClassDescriptor, getClassDescriptor, removeSchemaListener
 
Methods inherited from interface net.sf.jso.storage.StorageListener
objectDeleted, objectStored
 

Method Detail

start

public void start()
           throws StorageException
Starts the controller.

Throws:
StorageException

stop

public void stop()
          throws StorageException
Stops the controller.

Throws:
StorageException

getConfigurationProperties

public java.util.Properties getConfigurationProperties()
Returns configuration properties. Managers use this method to configure themselves.

Returns:
Configuration properties.

getStatus

public Status getStatus()
Gets controller's status.

Returns:
Controller's current status.

isRemote

public boolean isRemote()
Indicates if controller is running on another JVM.

Returns:
true if controller is running on another JVM; false otherwise.

createId

public long createId()
              throws StorageException
Creates an unique identification within a database.

Returns:
An unique id.
Throws:
StorageException

getControllerInfo

public ControllerInfo getControllerInfo()
Gets storage control information.

Returns:
Information about storage control.

getCurrentPID

public PID getCurrentPID()
                  throws StorageException
Gets current storage partition's identification.

Returns:
Current storage partition's identification.
Throws:
StorageException

getCurrentCycle

public int getCurrentCycle()
Gets current garbage collection cycle.

Returns:
Current garbage collection cycle.

registerManager

public void registerManager(StorageManager manager)
Register a storage manager to receive events.

Parameters:
manager - Manager to be registered.

unregisterManager

public void unregisterManager(StorageManager manager)
Unregister a storage manager to receive events.

Parameters:
manager - Manager to be unregistered.

addStatusListener

public void addStatusListener(StatusListener listener)
Starts sending status events to a listener.

Parameters:
listener - Listener to receive status events.

removeStatusListener

public void removeStatusListener(StatusListener listener)
Stops sending status events to a listener.

Parameters:
listener - Listener to stop receiving status events.

addStorageListener

public void addStorageListener(StorageListener listener)
Starts sending storage events to a listener.

Parameters:
listener - Listener to receive storage events.

removeStorageListener

public void removeStorageListener(StorageListener listener)
Stops sending storage events to a listener.

Parameters:
listener - Listener to stop receiving storage events.