|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A file system has methods to batch commands and allows retrieval of metadata relating to the file system itself, as well as a batch run method for operations that can be used to improve performance.
Method Summary | |
void |
addOperationHints(au.com.prunge.jgenfile.OperationHints hints)
Adds operation hints that operations created from this file system or objects derived from the file system (e.g. |
au.com.prunge.jgenfile.BatchOperation |
createBatchOperation(List operationList,
boolean abortOnError)
Creates an operation that runs a number of operations. |
au.com.prunge.jgenfile.CanGetItemFromAbsoluteReferenceOperation |
createCanGetItemFromAbsoluteReferenceOperation(au.com.prunge.jgenfile.AbsoluteItemReference ref)
Creates an operation that tests whether an item in the file system can be acquired given the specified absolute reference. |
au.com.prunge.jgenfile.CanGetFileSystemMetadataOperation |
createCanGetMetadataOperation(Set metadataKeySet)
Creates an operation that tests whether the specified metadata is accessible for this file system. |
au.com.prunge.jgenfile.CanGetRootsOperation |
createCanGetRootsOperation()
Creates an operation that tests whether the roots in this file system can be retrieved. |
au.com.prunge.jgenfile.CanSetFileSystemMetadataOperation |
createCanSetMetadataOperation(Set metadataKeySet)
Creates an operation that tests whether the specified metadata can be set for this file system. |
au.com.prunge.jgenfile.CloseFileSystemOperation |
createCloseOperation()
Creates an operation that closes this file system. |
au.com.prunge.jgenfile.GetFileSystemMetadataOperation |
createGetAllMetadataOperation()
Creates an operation that acquires all available metadata for this file system. |
au.com.prunge.jgenfile.GetItemFromAbsoluteReferenceOperation |
createGetItemFromAbsoluteReferenceOperation(au.com.prunge.jgenfile.AbsoluteItemReference ref)
Creates an operation that gets an item in the file system given an absolute reference. |
au.com.prunge.jgenfile.GetFileSystemMetadataOperation |
createGetMetadataOperation(Set metadataKeySet)
Creates an operation that acquires the specified metadata. |
au.com.prunge.jgenfile.GetRootOperation |
createGetRootOperation(String rootName)
Creates an operation that retrieves the root with the specified name in the file system. |
au.com.prunge.jgenfile.GetRootsOperation |
createGetRootsOperation()
Creates an operation that retrieves the roots in this file system. |
au.com.prunge.jgenfile.SetFileSystemMetadataOperation |
createSetMetadataOperation(Map metadataMap)
Creates an operation that sets the specified metadata for this file system. |
Set |
getAllFileSystemMetadataKeysSet()
Returns a set of metadata keys that can be used to access metadata for this file system. |
Set |
getAllItemMetadataKeysSet()
Returns a set of metadata keys that can be used to access metadata for items. |
OperationHints.Value |
getOperationHint(OperationHints.Key key)
Returns the value of a single hint. |
au.com.prunge.jgenfile.OperationHints |
getOperationHints()
Returns the operation hints that operations created from this file system or objects derived from the file system (e.g. |
void |
setOperationHint(OperationHints.Key key,
OperationHints.Value value)
Sets the value of a single hint. |
void |
setOperationHints(au.com.prunge.jgenfile.OperationHints hints)
Sets operation hints that operations created from this file system or objects derived from the file system (e.g. |
Method Detail |
public au.com.prunge.jgenfile.GetRootsOperation createGetRootsOperation() throws JGenFileException
JGenFileException
- if an error occurs creating
the operation.public au.com.prunge.jgenfile.CanGetRootsOperation createCanGetRootsOperation() throws JGenFileException
JGenFileException
- if an error occurs creating
the operation.public au.com.prunge.jgenfile.GetRootOperation createGetRootOperation(String rootName) throws JGenFileException
rootName
- the name of the root.
JGenFileException
- if an error occurs creating
the operation.public au.com.prunge.jgenfile.GetItemFromAbsoluteReferenceOperation createGetItemFromAbsoluteReferenceOperation(au.com.prunge.jgenfile.AbsoluteItemReference ref) throws JGenFileException, NullPointerException
ref
- an absolute reference to the item.
JGenFileException
- if an error occurs creating
the operation.
NullPointerException
- if ref
is null.public au.com.prunge.jgenfile.CanGetItemFromAbsoluteReferenceOperation createCanGetItemFromAbsoluteReferenceOperation(au.com.prunge.jgenfile.AbsoluteItemReference ref) throws JGenFileException, NullPointerException
ref
- an absolute reference to the item.
JGenFileException
- if an error occurs creating
the operation.
NullPointerException
- if ref
is null.public au.com.prunge.jgenfile.BatchOperation createBatchOperation(List operationList, boolean abortOnError) throws JGenFileException, NullPointerException, IllegalArgumentException
For example, if the size of ten files in a directory need to be acquired, you can run all the commands through this method which might use a single transaction through a socket to get all the required information. This would be faster than running each command separately since this would need ten transactions.
The results for each operation that is run successfully must be filled in by this method, whether or not the operation itself was run or some optimization was used instead.
operationList
- a list of operations to run.abortOnError
- if true, if an error is encountered
running an operation, no more
operations should be run. If false,
the other operations will attempt to
execute even if an error occurs.
JGenFileException
- if an error occurs creating the
operation.
NullPointerException
- if operationList
is null.
IllegalArgumentException
- if operationList
contains an object that does
not implement Operation.public au.com.prunge.jgenfile.CloseFileSystemOperation createCloseOperation() throws JGenFileException
After using a file system, closing it allows resources that it is using to be cleaned up. For example, if the file system uses a socket to access the network that socket may be closed when a close operation is run.
JGenFileException
- if the operation could not
be created.public au.com.prunge.jgenfile.GetFileSystemMetadataOperation createGetMetadataOperation(Set metadataKeySet) throws JGenFileException, NullPointerException
metadataKeySet
- a set of MetadataKey
objects.
JGenFileException
- if the operation could not be
created.
NullPointerException
- if metadataKeySet
is null.MetadataKey
public au.com.prunge.jgenfile.GetFileSystemMetadataOperation createGetAllMetadataOperation() throws JGenFileException
JGenFileException
- if the operation could not be
created.public au.com.prunge.jgenfile.CanGetFileSystemMetadataOperation createCanGetMetadataOperation(Set metadataKeySet) throws JGenFileException, NullPointerException
metadataKeySet
- a set of MetadataKey
objects representing the
elements of metadata to test for.
JGenFileException
- if the operation could not be
created.
NullPointerException
- if metadataKeySet
is null.MetadataKey
public au.com.prunge.jgenfile.SetFileSystemMetadataOperation createSetMetadataOperation(Map metadataMap) throws JGenFileException, NullPointerException
The map's keys should consist of MetadataKey objects, the values should be appropriate for each key.
metadataMap
- a map of MetadataKeys to values.
JGenFileException
- if the operation could not be
created.
NullPointerException
- if metadataMap
is null.MetadataKey
public au.com.prunge.jgenfile.CanSetFileSystemMetadataOperation createCanSetMetadataOperation(Set metadataKeySet) throws JGenFileException, NullPointerException
metadataKeySet
- a set of MetadataKey
objects representing the
elements of metadata to test for.
JGenFileException
- if the operation could not be
created.
NullPointerException
- if metadataKeySet
is null.MetadataKey
public Set getAllItemMetadataKeysSet()
This method returns a set of all the possible keys that can be used by items in the file system. Not all items in the file system need to have metadata for the keys returned in the set. It is possible that no items actually have metadata for this key. This method may be useful for user interfaces for giving the user a choice of what columns to display.
For example, a file system may support a 'bit rate' metadata key for accessing the bit rate of MP3 files. This metadata will only be available for MP3 files. This method should include a key for this metadata in the set returned by this method.
public Set getAllFileSystemMetadataKeysSet()
public void addOperationHints(au.com.prunge.jgenfile.OperationHints hints) throws NullPointerException
hints
- the hints to add.
NullPointerException
- if hints
is null.public void setOperationHints(au.com.prunge.jgenfile.OperationHints hints) throws NullPointerException
hints
- the hints to set.
NullPointerException
- if hints
is null.public au.com.prunge.jgenfile.OperationHints getOperationHints()
public OperationHints.Value getOperationHint(OperationHints.Key key) throws NullPointerException
key
- the operation hints key to get the value of.
NullPointerException
- if key
is null.public void setOperationHint(OperationHints.Key key, OperationHints.Value value) throws NullPointerException
key
- the key for the operation hint.value
- the value to give the operation hint.
NullPointerException
- if key
or value
is null.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |