public abstract class SQLMetadataStorageActionHandler<EntryType,StatusType,LogType,LockType> extends Object implements MetadataStorageActionHandler<EntryType,StatusType,LogType,LockType>
| Constructor and Description |
|---|
SQLMetadataStorageActionHandler(SQLMetadataConnector connector,
com.fasterxml.jackson.databind.ObjectMapper jsonMapper,
MetadataStorageActionHandlerTypes<EntryType,StatusType,LogType,LockType> types,
String entryTypeName,
String entryTable,
String logTable,
String lockTable) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTaskInfospublic SQLMetadataStorageActionHandler(SQLMetadataConnector connector, com.fasterxml.jackson.databind.ObjectMapper jsonMapper, MetadataStorageActionHandlerTypes<EntryType,StatusType,LogType,LockType> types, String entryTypeName, String entryTable, String logTable, String lockTable)
protected SQLMetadataConnector getConnector()
protected com.fasterxml.jackson.databind.ObjectMapper getJsonMapper()
protected com.fasterxml.jackson.core.type.TypeReference<StatusType> getStatusType()
protected String getEntryTable()
protected String getLogTable()
protected String getEntryTypeName()
public com.fasterxml.jackson.core.type.TypeReference<EntryType> getEntryType()
public void insert(String id, org.joda.time.DateTime timestamp, String dataSource, EntryType entry, boolean active, StatusType status, String type, String groupId) throws EntryExistsException
insert in interface MetadataStorageActionHandler<EntryType,StatusType,LogType,LockType>EntryExistsExceptionpublic static boolean isStatementException(Throwable e)
public boolean setStatus(String entryId, boolean active, StatusType status)
setStatus in interface MetadataStorageActionHandler<EntryType,StatusType,LogType,LockType>public com.google.common.base.Optional<EntryType> getEntry(String entryId)
getEntry in interface MetadataStorageActionHandler<EntryType,StatusType,LogType,LockType>public com.google.common.base.Optional<StatusType> getStatus(String entryId)
getStatus in interface MetadataStorageActionHandler<EntryType,StatusType,LogType,LockType>@Nullable public TaskInfo<EntryType,StatusType> getTaskInfo(String entryId)
getTaskInfo in interface MetadataStorageActionHandler<EntryType,StatusType,LogType,LockType>public List<TaskInfo<EntryType,StatusType>> getTaskInfos(Map<TaskLookup.TaskLookupType,TaskLookup> taskLookups, @Nullable String dataSource)
getTaskInfos in interface MetadataStorageActionHandler<EntryType,StatusType,LogType,LockType>public List<TaskInfo<TaskIdentifier,StatusType>> getTaskStatusList(Map<TaskLookup.TaskLookupType,TaskLookup> taskLookups, @Nullable String dataSource)
getTaskStatusList in interface MetadataStorageActionHandler<EntryType,StatusType,LogType,LockType>public boolean addLock(String entryId, LockType lock)
addLock in interface MetadataStorageActionHandler<EntryType,StatusType,LogType,LockType>public boolean replaceLock(String entryId, long oldLockId, LockType newLock)
replaceLock in interface MetadataStorageActionHandler<EntryType,StatusType,LogType,LockType>public void removeLock(long lockId)
removeLock in interface MetadataStorageActionHandler<EntryType,StatusType,LogType,LockType>public void removeTasksOlderThan(long timestamp)
removeTasksOlderThan in interface MetadataStorageActionHandler<EntryType,StatusType,LogType,LockType>public boolean addLog(String entryId, LogType log)
addLog in interface MetadataStorageActionHandler<EntryType,StatusType,LogType,LockType>public List<LogType> getLogs(String entryId)
getLogs in interface MetadataStorageActionHandler<EntryType,StatusType,LogType,LockType>@Deprecated public String getSqlRemoveLogsOlderThan()
public Map<Long,LockType> getLocks(String entryId)
getLocks in interface MetadataStorageActionHandler<EntryType,StatusType,LogType,LockType>@Nullable public Long getLockId(String entryId, LockType lock)
getLockId in interface MetadataStorageActionHandler<EntryType,StatusType,LogType,LockType>public void populateTaskTypeAndGroupIdAsync()
populateTaskTypeAndGroupIdAsync in interface MetadataStorageActionHandler<EntryType,StatusType,LogType,LockType>Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.