public interface TempletonStorage
Modifier and Type | Interface and Description |
---|---|
static class |
TempletonStorage.Type |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
STORAGE_CLASS |
static java.lang.String |
STORAGE_ROOT |
Modifier and Type | Method and Description |
---|---|
void |
closeStorage()
For storage methods that require a connection, this is a hint
that it's time to close the connection.
|
boolean |
delete(TempletonStorage.Type type,
java.lang.String id)
Delete a data grouping (all data for a jobid, all tracking data
for a job, etc.).
|
java.util.List<java.lang.String> |
getAll()
Get the id of each data grouping in the storage system.
|
java.util.List<java.lang.String> |
getAllForKey(java.lang.String key,
java.lang.String value)
Get the id of each data grouping that has the specific key/value
pair.
|
java.util.List<java.lang.String> |
getAllForType(TempletonStorage.Type type)
Get the id of each data grouping of a given type in the storage
system.
|
java.util.List<java.lang.String> |
getAllForTypeAndKey(TempletonStorage.Type type,
java.lang.String key,
java.lang.String value)
Get the id of each data grouping of a given type that has the
specific key/value pair.
|
java.lang.String |
getField(TempletonStorage.Type type,
java.lang.String id,
java.lang.String key)
Get the value of one field for a given data type.
|
java.util.Map<java.lang.String,java.lang.String> |
getFields(TempletonStorage.Type type,
java.lang.String id)
Get all the name/value pairs stored for this id.
|
void |
openStorage(Configuration config)
For storage methods that require a connection, this is a hint
that it's time to open a connection.
|
void |
saveField(TempletonStorage.Type type,
java.lang.String id,
java.lang.String key,
java.lang.String val)
Save a single key/value pair for a specific job id.
|
void |
startCleanup(Configuration config)
Start the cleanup process for this storage type.
|
static final java.lang.String STORAGE_CLASS
static final java.lang.String STORAGE_ROOT
void startCleanup(Configuration config)
config
- void saveField(TempletonStorage.Type type, java.lang.String id, java.lang.String key, java.lang.String val) throws NotFoundException
type
- The data type (as listed above)id
- The String id of this data grouping (jobid, etc.)key
- The name of the field to saveval
- The value of the field to saveNotFoundException
java.lang.String getField(TempletonStorage.Type type, java.lang.String id, java.lang.String key)
type
- The data type (as listed above)id
- The String id of this data grouping (jobid, etc.)key
- The name of the field to retrievejava.util.Map<java.lang.String,java.lang.String> getFields(TempletonStorage.Type type, java.lang.String id)
type
- The data type (as listed above)id
- The String id of this data grouping (jobid, etc.)boolean delete(TempletonStorage.Type type, java.lang.String id) throws NotFoundException
type
- The data type (as listed above)id
- The String id of this data grouping (jobid, etc.)NotFoundException
java.util.List<java.lang.String> getAll()
java.util.List<java.lang.String> getAllForType(TempletonStorage.Type type)
type
- The data type (as listed above)java.util.List<java.lang.String> getAllForKey(java.lang.String key, java.lang.String value)
key
- The name of the field to search forvalue
- The value of the field to search forjava.util.List<java.lang.String> getAllForTypeAndKey(TempletonStorage.Type type, java.lang.String key, java.lang.String value)
type
- The data type (as listed above)key
- The name of the field to search forvalue
- The value of the field to search forvoid openStorage(Configuration config) throws java.io.IOException
java.io.IOException
void closeStorage() throws java.io.IOException
java.io.IOException
Copyright © 2012 The Apache Software Foundation