|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MediaStorageVolume
This interface represents a media volume on a storage device and is
contained within a StorageProxy
. A
MediaStorageVolume is a specialized LogicalStorageVolume that
supports the recording and playback of media content through the
DVR. The volume also provides a mechanism for allocating a fixed
amount of storage for use by recordings on the volume.
Method Summary | |
---|---|
void |
addFreeSpaceListener(FreeSpaceListener listener,
int level)
Adds a listener that is notified when available free space is less than a specified level. |
void |
allocate(long bytes)
Allocates the specified amount of storage from the containing StorageProxy for use by recordings made to this volume. |
void |
allowAccess(java.lang.String[] organizations)
Adds a list of Organization strings to the set of organizations that are allowed to use this volume. |
long |
getAllocatedSpace()
Gets the amount of space allocated on this volume. |
java.lang.String[] |
getAllowedList()
Returns the list of Organizations who are allowed to use this volume. |
long |
getFreeSpace()
Gets the remaining available space from an allocation after accounting for all used space (including recordings, time shift buffers, and meta-data). |
void |
removeAccess(java.lang.String organization)
Removes an Organization from the list of Organization who are allowed to use this volume. |
void |
removeFreeSpaceListener(FreeSpaceListener listener)
Removes a free space listener. |
Methods inherited from interface org.ocap.storage.LogicalStorageVolume |
---|
getFileAccessPermissions, getPath, getStorageProxy, setFileAccessPermissions |
Method Detail |
---|
void allocate(long bytes)
A value of zero indicates that the volume has no minimum guaranteed size and may also use as much space as is available. Until set with the allocate() method, the space allocated is zero.
Subsequent calls to allocate() change the existing allocation. However, if a new allocation size is too small to contain existing recordings a IllegalArgumentException is thrown and the allocation size is not changed. Except when the allocation size is changed to zero which removes the limit and the guaranteed storage size. The allocated space can only be released by an explicit call to allocate() or through the deletion of the storage volume.
bytes
- Number of bytes to allocate.
java.lang.SecurityException
- if the calling application does not have
MonitorAppPermission("storage") permission.
java.lang.IllegalArgumentException
- if the requested amount of storage
exceeds the amount available for allocation, or reduces the
previous allocation making it too small for existing recordings.long getAllocatedSpace()
long getFreeSpace()
void allowAccess(java.lang.String[] organizations)
Note: Given Organization strings should represent an application's
organization_id
, formatted as would be found in the
OrganizationName field of the application's leaf certificate.
That is, the organization_id
as a fixed length 8 character hexadecimal string (with leading zeros
where required).
organizations
- An array of strings representing organizations
that are allowed to use this volume. The String passed as a
parameter to the record method should match one of this strings
to record onto this volume. If an array of length 0 is passed,
any application can use this volume. If null is passed in and
all access to this volume has been removed by a call to the
removeAccess
method, then access is restored to the
same organizations that had access before all access was removed.
java.lang.SecurityException
- if the calling application is not the
owner of the volume and does not have
MonitorAppPermission("storage") permission.void removeAccess(java.lang.String organization)
organization
- A string representing an organization that should
be removed from the list of allowed organizations. Passing in
null removes all application access to this volume.
java.lang.SecurityException
- if the calling application is not the owner
and the calling application does not have
MonitorAppPermission("storage") permission.java.lang.String[] getAllowedList()
void addFreeSpaceListener(FreeSpaceListener listener, int level)
listener
- The listener to be added.level
- The level of free space remaining at which to notify the listener.void removeFreeSpaceListener(FreeSpaceListener listener)
listener
- The listener to remove.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |