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
|
compareTo
static 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 levelDataStorageException
IOException
OutputStream create() throws IOException
IOException
void 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...IOException
void copy(ElementDescriptor dstName, boolean removeSrc) throws IOException
IOException
InputStream open(Properties configuration) throws IOException
configuration
- DataStorageExecption
- e.g. entity does not exist...IOException
InputStream open() throws IOException
IOException
SeekableInputStream sopen(Properties configuration) throws IOException
configuration
- DataStorageException
IOException
SeekableInputStream sopen() throws IOException
IOException
boolean exists() throws IOException
IOException
void rename(ElementDescriptor newName) throws IOException
newName
- new name of entityDataStorageException
IOException
void delete() throws IOException
DataStorageException
IOException
Properties getConfiguration() throws IOException
IOException
void updateConfiguration(Properties newConfig) throws IOException
newConfig
- configurationDataStorageException
IOException
boolean systemElement()
Map<String,Object> getStatistics() throws IOException
IOException
Copyright © 2007-2017 The Apache Software Foundation