|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ocap.storage.StorageManager
public abstract class StorageManager
This class represents the storage manager which keeps track of the storage devices attached to the system.
Constructor Summary | |
---|---|
protected |
StorageManager()
Protected default constructor. |
Method Summary | |
---|---|
abstract void |
addAvailableStorageListener(AvailableStorageListener listener,
int highWaterMark)
Adds a listener for high water mark reached in available persistent storage indicated by the dvb.persistent.root property. |
abstract void |
addStorageManagerListener(StorageManagerListener listener)
Adds a listener to receive StorageManagerEvents when a storage proxy is added, removed or changes state. |
abstract long |
getAvailablePersistentStorage()
Gets the available amount of persistent storage under the location indicated by the dvb.persistent.root property that is available to all OCAP-J applications. |
static StorageManager |
getInstance()
Gets the singleton instance of the storage manager. |
abstract StorageProxy[] |
getStorageProxies()
Gets the set of StorageProxy instances representing all
of the currently attached or embedded storage devices. |
abstract long |
getTotalPersistentStorage()
Gets the total amount of persistent storage under the location indicated by the dvb.persistent.root property and that is usable by all OCAP-J applications. |
abstract void |
removeAvailableStorageListener(AvailableStorageListener listener)
Removes an available storage listener that was registered using the addAvailableStorageListener method. |
abstract void |
removeStorageManagerListener(StorageManagerListener listener)
Removes a listener so that it no longer receives StorageManagerEvents when storage proxies change. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected StorageManager()
Method Detail |
---|
public static StorageManager getInstance()
public abstract StorageProxy[] getStorageProxies()
StorageProxy
instances representing all
of the currently attached or embedded storage devices.
public abstract void addStorageManagerListener(StorageManagerListener listener)
listener
- The storage manager listener to be added.
java.lang.IllegalArgumentException
- if the listener parameter is null.public abstract void removeStorageManagerListener(StorageManagerListener listener)
listener
- The storage manager listener to be removed.
java.lang.IllegalArgumentException
- if the listener parameter is null.public abstract long getTotalPersistentStorage()
public abstract long getAvailablePersistentStorage()
public abstract void addAvailableStorageListener(AvailableStorageListener listener, int highWaterMark)
listener
- The listener to add.highWaterMark
- Percentage of the available persistent storage
remaining when the listener is to be informed. For instance,
if the total available persistent storage is 1MB and the high
water mark is 75 then high water listeners will be informed when
750KB have been allocated for application use.
java.lang.IllegalArgumentException
- if the listener parameter could not be
added or is null.public abstract void removeAvailableStorageListener(AvailableStorageListener listener)
addAvailableStorageListener
method. If the parameter
is not currently registered this method does nothing successfully.
listener
- The listener to remove.
java.lang.IllegalArgumentException
- if the parameter is null.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |