public interface MetadataStorageActionHandler<EntryType,StatusType,LogType,LockType>
| Modifier and Type | Method and Description |
|---|---|
boolean |
addLock(String entryId,
LockType lock)
Add a lock to the given entry
|
boolean |
addLog(String entryId,
LogType log)
Add a log to the entry with the given id.
|
List<com.metamx.common.Pair<EntryType,StatusType>> |
getActiveEntriesWithStatus()
Return all active entries with their respective status
|
com.google.common.base.Optional<EntryType> |
getEntry(String entryId)
Retrieves the entry with the given id.
|
List<StatusType> |
getInactiveStatusesSince(org.joda.time.DateTime timestamp)
Return all statuses for inactive entries created on or later than the given timestamp
|
Map<Long,LockType> |
getLocks(String entryId)
Returns the locks for the given entry
|
List<LogType> |
getLogs(String entryId)
Returns the logs for the entry with the given id.
|
com.google.common.base.Optional<StatusType> |
getStatus(String entryId)
Retrieve the status for the entry with the given id.
|
void |
insert(String id,
org.joda.time.DateTime timestamp,
String dataSource,
EntryType entry,
boolean active,
StatusType status)
Creates a new entry.
|
boolean |
removeLock(long lockId)
Remove the lock with the given lock id.
|
boolean |
setStatus(String entryId,
boolean active,
StatusType status)
Sets or updates the status for any active entry with the given id.
|
void insert(@NotNull
String id,
@NotNull
org.joda.time.DateTime timestamp,
@NotNull
String dataSource,
@NotNull
EntryType entry,
boolean active,
@Nullable
StatusType status)
throws EntryExistsException
id - entry idtimestamp - timestamp this entry was createddataSource - datasource associated with this entryentry - object representing this entryactive - active or inactive flagstatus - status object associated wit this object, can be nullEntryExistsExceptionboolean setStatus(String entryId, boolean active, StatusType status)
entryId - entry idactive - activestatus - statuscom.google.common.base.Optional<EntryType> getEntry(String entryId)
entryId - entry idcom.google.common.base.Optional<StatusType> getStatus(String entryId)
entryId - entry idList<com.metamx.common.Pair<EntryType,StatusType>> getActiveEntriesWithStatus()
List<StatusType> getInactiveStatusesSince(org.joda.time.DateTime timestamp)
timestamp - timestampboolean addLock(String entryId, LockType lock)
entryId - entry idlock - lock to addboolean removeLock(long lockId)
lockId - lock idboolean addLog(String entryId, LogType log)
entryId - entry idlog - log to addList<LogType> getLogs(String entryId)
entryId - entry idCopyright © 2011–2015. All rights reserved.