Interface TaskEntry<ScopeT>

All Superinterfaces:
AutoCloseable
All Known Implementing Classes:
AbstractTaskEntry, NullTaskEntry, UnixFSTaskEntryBase, UnixFSTaskEntryExisting, UnixFSTaskEntryNew

public interface TaskEntry<ScopeT> extends AutoCloseable
Represents a TaskEntry
  • 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

      default ScopeT getScope()
      Gets the scope of the task entry.
      Returns:
      the scope
    • getOriginalScope

      default ScopeT getOriginalScope()
      Gets the scope of the task entry.
      Returns:
      the scope
    • findScope

      Optional<ScopeT> findScope()
      Finds the scope for the TaskEntry.
      Returns:
    • findOriginalScope

      Optional<ScopeT> findOriginalScope()
      Finds the original scope of the original TaskEntry<ScopeT>
      Returns:
    • getTasksImmutable

      Map<TaskId,TransactionalTask> getTasksImmutable()
      Gets the tasks associated with this TaskEntry.
      Returns:
      the tasks
    • getOriginalTasksImmutable

      Map<TaskId,TransactionalTask> getOriginalTasksImmutable()
      Gets all of hte original tasks in this TaskEntry.
      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

      boolean deleteTask(TaskId taskId)
      Deletes a TaskId and timestamp from this TaskIndex.
      Parameters:
      taskId - the TaskId
    • addTask

      boolean addTask(TaskId taskId, long timestamp)
      Adds a TaskId and timestamp to the TaskIndex.
      Parameters:
      taskId - the TaskId
      timestamp - the timestamp at which to fire the task
    • flush

      void flush(TransactionJournal.MutableEntry journalEntry)
      Flushes this TaskEntry to disk.
      Parameters:
      journalEntry -
    • close

      void close()
      Closes this TaskEntry.
      Specified by:
      close in interface AutoCloseable
    • newTaskSet

      static SortedSet<TransactionalTask> newTaskSet()
      Useful for cerating a Set<TransactionalTask>.
      Returns:
      the TransactionalTask set