public interface ElementDescriptor extends java.lang.Comparable<ElementDescriptor>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BLOCK_REPLICATION_KEY
Available from getConfiguration as a String and getStatistics as a Short.
|
static java.lang.String |
BLOCK_SIZE_KEY
Available from getConfiguration as a String and getStatistics as a Long.
|
static java.lang.String |
LENGTH_KEY
Available from getStatistics as a Long.
|
static java.lang.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,
java.util.Properties dstConfiguration,
boolean removeSrc)
Copy entity from an existing one, possibly residing in a
different Data Storage.
|
java.io.OutputStream |
create() |
java.io.OutputStream |
create(java.util.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
|
java.util.Properties |
getConfiguration()
Retrieve configuration information for entity
|
DataStorage |
getDataStorage() |
java.util.Map<java.lang.String,java.lang.Object> |
getStatistics()
List entity statistics
|
java.io.InputStream |
open() |
java.io.InputStream |
open(java.util.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(java.util.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(java.util.Properties newConfig)
Update configuration information for this entity
|
static final java.lang.String BLOCK_SIZE_KEY
static final java.lang.String BLOCK_REPLICATION_KEY
static final java.lang.String LENGTH_KEY
static final java.lang.String MODIFICATION_TIME_KEY
DataStorage getDataStorage()
java.io.OutputStream create(java.util.Properties configuration) throws java.io.IOException
configuration
- information at the object levelDataStorageException
java.io.IOException
java.io.OutputStream create() throws java.io.IOException
java.io.IOException
void copy(ElementDescriptor dstName, java.util.Properties dstConfiguration, boolean removeSrc) throws java.io.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...java.io.IOException
void copy(ElementDescriptor dstName, boolean removeSrc) throws java.io.IOException
java.io.IOException
java.io.InputStream open(java.util.Properties configuration) throws java.io.IOException
configuration
- DataStorageExecption
- e.g. entity does not exist...java.io.IOException
java.io.InputStream open() throws java.io.IOException
java.io.IOException
SeekableInputStream sopen(java.util.Properties configuration) throws java.io.IOException
configuration
- DataStorageException
java.io.IOException
SeekableInputStream sopen() throws java.io.IOException
java.io.IOException
boolean exists() throws java.io.IOException
java.io.IOException
void rename(ElementDescriptor newName) throws java.io.IOException
newName
- new name of entityDataStorageException
java.io.IOException
void delete() throws java.io.IOException
DataStorageException
java.io.IOException
java.util.Properties getConfiguration() throws java.io.IOException
java.io.IOException
void updateConfiguration(java.util.Properties newConfig) throws java.io.IOException
newConfig
- configurationDataStorageException
java.io.IOException
boolean systemElement()
java.util.Map<java.lang.String,java.lang.Object> getStatistics() throws java.io.IOException
java.io.IOException
Copyright © 2007-2012 The Apache Software Foundation