public interface ElementDescriptor extends Comparable<ElementDescriptor>
| Modifier and Type | Field and Description |
|---|---|
static String |
BLOCK_REPLICATION_KEY
Available from getConfiguration as a String and getStatistics as a Short.
|
static String |
BLOCK_SIZE_KEY
Available from getConfiguration as a String and getStatistics as a Long.
|
static String |
LENGTH_KEY
Available from getStatistics as a Long.
|
static String |
MODIFICATION_TIME_KEY
Available from getStatistics as a Long.
|
| Modifier and Type | Method and Description |
|---|---|
void |
copy(ElementDescriptor dstName,
boolean removeSrc) |
void |
copy(ElementDescriptor dstName,
Properties dstConfiguration,
boolean removeSrc)
Copy entity from an existing one, possibly residing in a
different Data Storage.
|
OutputStream |
create() |
OutputStream |
create(Properties configuration)
Opens a stream onto which an entity can be written to.
|
void |
delete()
Remove entity from the Data Storage.
|
boolean |
exists()
Checks whether the entity exists or not
|
Properties |
getConfiguration()
Retrieve configuration information for entity
|
DataStorage |
getDataStorage() |
Map<String,Object> |
getStatistics()
List entity statistics
|
InputStream |
open() |
InputStream |
open(Properties configuration)
Open for read a given entity
|
void |
rename(ElementDescriptor newName)
Changes the name of an entity in the Data Storage
|
SeekableInputStream |
sopen() |
SeekableInputStream |
sopen(Properties configuration)
Open an element in the Data Storage with support for random access
(seek operations).
|
boolean |
systemElement()
Defines whether the element is visible to users or
contains system's metadata
|
void |
updateConfiguration(Properties newConfig)
Update configuration information for this entity
|
compareTostatic final String BLOCK_SIZE_KEY
static final String BLOCK_REPLICATION_KEY
static final String LENGTH_KEY
static final String MODIFICATION_TIME_KEY
DataStorage getDataStorage()
OutputStream create(Properties configuration) throws IOException
configuration - information at the object levelDataStorageExceptionIOExceptionOutputStream create() throws IOException
IOExceptionvoid copy(ElementDescriptor dstName, Properties dstConfiguration, boolean removeSrc) throws IOException
dstName - name of entity to createdstConfiguration - configuration for the new entityremoveSrc - if src entity needs to be removed after copying itDataStorageException - for instance, configuration
information for new entity is not compatible with
configuration information at the Data
Storage level, user does not have privileges to read from
source entity or write to destination storage...IOExceptionvoid copy(ElementDescriptor dstName, boolean removeSrc) throws IOException
IOExceptionInputStream open(Properties configuration) throws IOException
configuration - DataStorageExecption - e.g. entity does not exist...IOExceptionInputStream open() throws IOException
IOExceptionSeekableInputStream sopen(Properties configuration) throws IOException
configuration - DataStorageExceptionIOExceptionSeekableInputStream sopen() throws IOException
IOExceptionboolean exists()
throws IOException
IOExceptionvoid rename(ElementDescriptor newName) throws IOException
newName - new name of entityDataStorageExceptionIOExceptionvoid delete()
throws IOException
DataStorageExceptionIOExceptionProperties getConfiguration() throws IOException
IOExceptionvoid updateConfiguration(Properties newConfig) throws IOException
newConfig - configurationDataStorageExceptionIOExceptionboolean systemElement()
Map<String,Object> getStatistics() throws IOException
IOExceptionCopyright © 2007-2017 The Apache Software Foundation