Interface TaskEntry<ScopeT>
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
AbstractTaskEntry
,NullTaskEntry
,UnixFSTaskEntryBase
,UnixFSTaskEntryExisting
,UnixFSTaskEntryNew
Represents a
TaskEntry
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
An operational strategy, which defines a list of tasks. -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
close()
Closes thisTaskEntry
.boolean
delete()
Clears this entry, if the entry is absent, then this has no effect.boolean
deleteTask
(TaskId taskId) Finds the scope for theTaskEntry
.void
flush
(TransactionJournal.MutableEntry journalEntry) Flushes thisTaskEntry
to disk.default ScopeT
Gets the scope of the task entry.Gets all of hte original tasks in thisTaskEntry
.default ScopeT
getScope()
Gets the scope of the task entry.Gets the tasks associated with thisTaskEntry
.default boolean
isAbsent()
Returns true if the entry represents an absent entry.default boolean
Returns true if the entry represents present entry.static SortedSet
<TransactionalTask> Useful for cerating aSet<TransactionalTask>
.
-
Method Details
-
isPresent
default boolean isPresent()Returns true if the entry represents present entry.- Returns:
- true if nascent, false otherwise
-
isAbsent
default boolean isAbsent()Returns true if the entry represents an absent entry.- Returns:
- true if absent, false otherwise
-
getScope
Gets the scope of the task entry.- Returns:
- the scope
-
getOriginalScope
Gets the scope of the task entry.- Returns:
- the scope
-
findScope
Finds the scope for theTaskEntry
.- Returns:
-
findOriginalScope
- Returns:
-
getTasksImmutable
Map<TaskId,TransactionalTask> getTasksImmutable()Gets the tasks associated with thisTaskEntry
.- Returns:
- the tasks
-
getOriginalTasksImmutable
Map<TaskId,TransactionalTask> getOriginalTasksImmutable()Gets all of hte original tasks in thisTaskEntry
.- Returns:
- the
Set<TransactionalTask>
-
delete
boolean delete()Clears this entry, if the entry is absent, then this has no effect.- Returns:
- true if the clearing had any effect on this entry.
-
deleteTask
- Parameters:
taskId
- theTaskId
-
addTask
- Parameters:
taskId
- theTaskId
timestamp
- the timestamp at which to fire the task
-
flush
Flushes thisTaskEntry
to disk.- Parameters:
journalEntry
-
-
close
void close()Closes thisTaskEntry
.- Specified by:
close
in interfaceAutoCloseable
-
newTaskSet
Useful for cerating aSet<TransactionalTask>
.- Returns:
- the
TransactionalTask
set
-