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 interfaceAn operational strategy, which defines a list of tasks. -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidclose()Closes thisTaskEntry.booleandelete()Clears this entry, if the entry is absent, then this has no effect.booleandeleteTask(TaskId taskId) Finds the scope for theTaskEntry.voidflush(TransactionJournal.MutableEntry journalEntry) Flushes thisTaskEntryto disk.default ScopeTGets the scope of the task entry.Gets all of hte original tasks in thisTaskEntry.default ScopeTgetScope()Gets the scope of the task entry.Gets the tasks associated with thisTaskEntry.default booleanisAbsent()Returns true if the entry represents an absent entry.default booleanReturns 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- theTaskIdtimestamp- the timestamp at which to fire the task
-
flush
Flushes thisTaskEntryto disk.- Parameters:
journalEntry-
-
close
void close()Closes thisTaskEntry.- Specified by:
closein interfaceAutoCloseable
-
newTaskSet
Useful for cerating aSet<TransactionalTask>.- Returns:
- the
TransactionalTaskset
-