public class PermanentStorageObjectstore extends java.lang.Object implements PermanentStorage
Constructor and Description |
---|
PermanentStorageObjectstore() |
Modifier and Type | Method and Description |
---|---|
protected void |
activate(ComponentContext context)
OSGi Declarative Services service activation method.
|
void |
addBucket(BucketDefinition bucket)
Write bucket definition to storage.
|
void |
addJob(JobDefinition job)
Write job definition to storage.
|
void |
addWorkflow(WorkflowDefinition workflow)
Write workflow definition to storage.
|
boolean |
containsJobRun(java.lang.String jobName,
java.lang.String jobRunId) |
protected void |
deactivate(ComponentContext context)
OSGi Declarative Services service deactivation method.
|
void |
deleteJobRunData(java.lang.String jobName,
java.lang.String jobRunId)
Deletes the stored data for the given job run.
|
BucketDefinition |
getBucket(java.lang.String name)
get bucket definition from storage.
|
java.util.Collection<java.lang.String> |
getBuckets()
Get bucket names defined in storage.
|
JobDefinition |
getJob(java.lang.String name)
get job definition from storage.
|
AnyMap |
getJobRunData(java.lang.String jobName,
java.lang.String jobRunId) |
java.util.Collection<java.lang.String> |
getJobRunIds(java.lang.String jobName) |
java.util.Collection<java.lang.String> |
getJobs()
Get job names defined in storage.
|
WorkflowDefinition |
getWorkflow(java.lang.String name)
get workflow definition from storage.
|
java.util.Collection<java.lang.String> |
getWorkflows()
Get workflow names defined in storage.
|
boolean |
hasJob(java.lang.String name) |
void |
removeBucket(java.lang.String name)
Remove bucket definition from storage.
|
void |
removeJob(java.lang.String name)
Remove job definition from storage.
|
void |
removeWorkflow(java.lang.String name)
Remove workflow definition from storage.
|
void |
setObjectStoreService(ObjectStoreService objectStoreService)
method for DS to set a service reference.
|
void |
storeJobRun(java.lang.String jobName,
java.lang.String jobRunId,
AnyMap jobRunData)
Stores the job run data for the given job run.
|
void |
unsetObjectStoreService(ObjectStoreService objectStoreService)
method for DS to unset a service reference.
|
protected void activate(ComponentContext context) throws ObjectStoreException
context
- OSGi service component context.ObjectStoreException
- could not prepare store.protected void deactivate(ComponentContext context)
context
- OSGi service component context.public void setObjectStoreService(ObjectStoreService objectStoreService)
objectStoreService
- ObjectStoreService reference.public void unsetObjectStoreService(ObjectStoreService objectStoreService)
objectStoreService
- ObjectStoreService reference.public void addBucket(BucketDefinition bucket) throws PersistenceException
addBucket
in interface PermanentStorage
bucket
- bucket definitionPersistenceException
- error writing.public BucketDefinition getBucket(java.lang.String name) throws PersistenceException
getBucket
in interface PermanentStorage
name
- bucket namenull
if bucket doesn't exist.PersistenceException
- error reading bucket definitionpublic void removeBucket(java.lang.String name) throws PersistenceException
removeBucket
in interface PermanentStorage
name
- bucket namePersistenceException
- error deleting.public java.util.Collection<java.lang.String> getBuckets() throws PersistenceException
getBuckets
in interface PermanentStorage
PersistenceException
- error reading.public void addJob(JobDefinition job) throws PersistenceException
addJob
in interface PermanentStorage
job
- job definitionPersistenceException
- error writing.public JobDefinition getJob(java.lang.String name) throws PersistenceException
getJob
in interface PermanentStorage
name
- job namenull
if job doesn't exist.PersistenceException
- error reading job definitionpublic boolean hasJob(java.lang.String name) throws PersistenceException
hasJob
in interface PermanentStorage
name
- job namePersistenceException
- error checking existence.public void removeJob(java.lang.String name) throws PersistenceException
removeJob
in interface PermanentStorage
name
- job namePersistenceException
- error deleting.public java.util.Collection<java.lang.String> getJobs() throws PersistenceException
getJobs
in interface PermanentStorage
PersistenceException
- error reading.public void addWorkflow(WorkflowDefinition workflow) throws PersistenceException
addWorkflow
in interface PermanentStorage
workflow
- workflow definitionPersistenceException
- error writing.public WorkflowDefinition getWorkflow(java.lang.String name) throws PersistenceException
getWorkflow
in interface PermanentStorage
name
- workflow namenull
if workflow doesn't exist.PersistenceException
- error reading workflow definitionpublic java.util.Collection<java.lang.String> getWorkflows() throws PersistenceException
getWorkflows
in interface PermanentStorage
PersistenceException
- error reading.public void removeWorkflow(java.lang.String name) throws PersistenceException
removeWorkflow
in interface PermanentStorage
name
- workflow namePersistenceException
- error deleting.public java.util.Collection<java.lang.String> getJobRunIds(java.lang.String jobName) throws PersistenceException
getJobRunIds
in interface PermanentStorage
jobName
- the job for which to return the job run idsPersistenceException
- error accessing storepublic void storeJobRun(java.lang.String jobName, java.lang.String jobRunId, AnyMap jobRunData)
storeJobRun
in interface PermanentStorage
jobName
- the jobjobRunId
- the job run for which to store the datajobRunData
- the job run datapublic boolean containsJobRun(java.lang.String jobName, java.lang.String jobRunId) throws PersistenceException
containsJobRun
in interface PermanentStorage
jobName
- the jobjobRunId
- the job run for which to check if it's contained in the storePersistenceException
- error accessing storepublic AnyMap getJobRunData(java.lang.String jobName, java.lang.String jobRunId) throws PersistenceException
getJobRunData
in interface PermanentStorage
jobName
- the jobjobRunId
- the job run idPersistenceException
- error accessing storepublic void deleteJobRunData(java.lang.String jobName, java.lang.String jobRunId) throws PersistenceException
deleteJobRunData
in interface PermanentStorage
jobName
- the jobjobRunId
- the id of the job run for which to delete the dataPersistenceException
- error accessing store