|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DetachableStorageOption
This interface represents an external device that can be detached. The methods on this
interface allow a detachable device to be detached safely. In addition, when a
detachable storage device is attached for the first time, its StorageProxy provides
a means to initialize the device. If initialization is needed, the StorageProxy will
be in one of two states:
UNSUPPORTED_FORMAT
or UNINITIALIZED
. When the StorageProxy is in one of these two
states, the initialize method must be called before the device can be used.
Method Summary | |
---|---|
boolean |
isDetachable()
Determines whether the device associated with this storage proxy is ready to be detached. |
void |
makeDetachable()
Makes the device safe to be detached. |
void |
makeReady()
Makes the device ready for use. |
Method Detail |
---|
boolean isDetachable()
void makeDetachable() throws java.io.IOException
OFFLINE
. The latter indicates that the
device may be brought back online. If it is removed from the database, attempts to
use the storage proxy result in an IOException.
java.lang.SecurityException
- if the calling application does not have
MonitorAppPermission("storage").
java.io.IOException
- if the system is unable to make the device safe to detach.void makeReady() throws java.io.IOException
OFFLINE
state, this method attempts to activate the
device and make it available. For example, a device may be left in an OFFLINE state
after it has been made ready to detach, but not actually unplugged. This method has
no effect if the device is already in the READY
state.
java.lang.SecurityException
- if the calling application does not have
MonitorAppPermission("storage").
java.io.IOException
- if the device was not in the READY or OFFLINE state when the
method was called.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |