public class OrientDBPersistenceConnector extends SmartExecutorPersistenceConnector
| Modifier and Type | Field and Description |
|---|---|
protected String |
ITERATION |
protected com.orientechnologies.orient.core.db.OPartitionedDatabasePool |
oPartitionedDatabasePool |
protected String |
RUN_ON |
protected String |
SCOPE |
protected String |
TIMESTAMP |
protected String |
UUID |
| Constructor and Description |
|---|
OrientDBPersistenceConnector(SmartExecutorPersistenceConfiguration configuration) |
| Modifier and Type | Method and Description |
|---|---|
void |
addScheduledTask(ScheduledTask scheduledTask)
Create a Scheduled Task on persistence
|
void |
close()
Close the connection to DB
|
List<ScheduledTask> |
getOrphanScheduledTasks(Collection<? extends org.gcube.vremanagement.executor.plugin.PluginDeclaration> pluginDeclarations)
Retrieve from the #SmartExecutorPersistenceConnector the orphaned
Scheduled tasks
|
org.gcube.vremanagement.executor.plugin.PluginStateEvolution |
getPluginInstanceState(UUID uuid,
Integer iterationNumber)
Retrieve the status of the iterationNumber (passed as parameter) of a running/run
Plugin which is/was identified
by the UUID passed as parameter |
ScheduledTask |
getScheduledTask(UUID uuid)
Return the Scheduled Task if any, null otherwise
|
protected com.orientechnologies.orient.core.record.impl.ODocument |
getScheduledTaskDocument(com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx db,
UUID uuid) |
void |
pluginStateEvolution(org.gcube.vremanagement.executor.plugin.PluginStateEvolution pluginStateEvolution,
Exception exception) |
protected void |
prepareConnection(SmartExecutorPersistenceConfiguration configuration) |
void |
releaseScheduledTask(ScheduledTask scheduledTask)
Release the Scheduled Task leaving it as orphan on persistence
|
void |
releaseScheduledTask(UUID uuid)
Release the Scheduled Task leaving it as orphan on persistence
|
void |
removeScheduledTask(ScheduledTask scheduledTask)
Remove from persistence the Scheduled Task.
|
void |
removeScheduledTask(UUID uuid)
Remove from persistence the Scheduled Task.
|
void |
reserveScheduledTask(ScheduledTask scheduledTask)
Reserve an orphan Scheduled tasks
|
isOrphanprotected final String SCOPE
protected final String UUID
protected final String ITERATION
protected final String TIMESTAMP
protected final String RUN_ON
protected com.orientechnologies.orient.core.db.OPartitionedDatabasePool oPartitionedDatabasePool
public OrientDBPersistenceConnector(SmartExecutorPersistenceConfiguration configuration) throws Exception
Exceptionprotected void prepareConnection(SmartExecutorPersistenceConfiguration configuration) throws Exception
Exceptionpublic void close()
throws Exception
SmartExecutorPersistenceConnectorclose in class SmartExecutorPersistenceConnectorException - if failspublic org.gcube.vremanagement.executor.plugin.PluginStateEvolution getPluginInstanceState(UUID uuid, Integer iterationNumber) throws org.gcube.vremanagement.executor.exception.PluginInstanceNotFoundException, org.gcube.vremanagement.executor.exception.ExecutorException
SmartExecutorPersistenceConnectorPlugin which is/was identified
by the UUID passed as parametergetPluginInstanceState in class SmartExecutorPersistenceConnectoruuid - the execution identifier of the running/run PluginiterationNumber - the iterationNumber (null to get the last)PluginState of the Pluginorg.gcube.vremanagement.executor.exception.PluginInstanceNotFoundExceptionorg.gcube.vremanagement.executor.exception.ExecutorExceptionpublic void pluginStateEvolution(org.gcube.vremanagement.executor.plugin.PluginStateEvolution pluginStateEvolution,
Exception exception)
throws Exception
pluginStateEvolution in class org.gcube.vremanagement.executor.plugin.PluginStateNotificationExceptionpublic void addScheduledTask(ScheduledTask scheduledTask) throws SchedulePersistenceException
ScheduledTaskPersistencescheduledTask - to create on persistenceSchedulePersistenceException - if failspublic List<ScheduledTask> getOrphanScheduledTasks(Collection<? extends org.gcube.vremanagement.executor.plugin.PluginDeclaration> pluginDeclarations) throws SchedulePersistenceException
ScheduledTaskPersistenceSchedulePersistenceException - if failsprotected com.orientechnologies.orient.core.record.impl.ODocument getScheduledTaskDocument(com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx db,
UUID uuid)
throws SchedulePersistenceException
SchedulePersistenceExceptionpublic ScheduledTask getScheduledTask(UUID uuid) throws SchedulePersistenceException
ScheduledTaskPersistenceuuid - which identify the Scheduled TaskSchedulePersistenceException - if failspublic void reserveScheduledTask(ScheduledTask scheduledTask) throws SchedulePersistenceException
ScheduledTaskPersistenceSchedulePersistenceException - if failspublic void removeScheduledTask(UUID uuid) throws SchedulePersistenceException
ScheduledTaskPersistenceuuid - the uuid which (will) identify the task on the SmartExecutor
instanceSchedulePersistenceExceptionpublic void removeScheduledTask(ScheduledTask scheduledTask) throws SchedulePersistenceException
ScheduledTaskPersistenceSchedulePersistenceExceptionpublic void releaseScheduledTask(UUID uuid) throws SchedulePersistenceException
ScheduledTaskPersistenceuuid - the uuid which (will) identify the task on the SmartExecutor
instanceSchedulePersistenceExceptionpublic void releaseScheduledTask(ScheduledTask scheduledTask) throws SchedulePersistenceException
ScheduledTaskPersistenceSchedulePersistenceExceptionCopyright © 2018. All Rights Reserved.