Class AbstractThreadsafeJobResultStore

    • Constructor Detail

      • AbstractThreadsafeJobResultStore

        protected AbstractThreadsafeJobResultStore​(Executor ioExecutor)
    • Method Detail

      • markResultAsCleanAsync

        public CompletableFuture<Void> markResultAsCleanAsync​(JobID jobId)
        Description copied from interface: JobResultStore
        Marks an existing JobResultEntry as clean. This indicates that no more resource cleanup steps need to be performed. No actions should be triggered if the passed JobID belongs to a job that was already marked as clean.
        Specified by:
        markResultAsCleanAsync in interface JobResultStore
        Parameters:
        jobId - Ident of the job we wish to mark as clean.
        Returns:
        a successfully completed future if the result is marked successfully. The future can complete exceptionally with a NoSuchElementException. i.e. there is no corresponding dirty job present in the store for the given JobID.
      • hasJobResultEntryAsync

        public CompletableFuture<Boolean> hasJobResultEntryAsync​(JobID jobId)
        Description copied from interface: JobResultStore
        Returns the future of whether the store already contains an entry for a job.
        Specified by:
        hasJobResultEntryAsync in interface JobResultStore
        Parameters:
        jobId - Ident of the job we wish to check the store for.
        Returns:
        a successfully completed future with true if a dirty or clean JobResultEntry exists for the given JobID; otherwise false.
      • hasDirtyJobResultEntryAsync

        public CompletableFuture<Boolean> hasDirtyJobResultEntryAsync​(JobID jobId)
        Description copied from interface: JobResultStore
        Returns the future of whether the store contains a dirty entry for the given JobID.
        Specified by:
        hasDirtyJobResultEntryAsync in interface JobResultStore
        Parameters:
        jobId - Ident of the job we wish to check the store for.
        Returns:
        a successfully completed future with true, if a dirty entry exists for the given JobID; otherwise false.
      • hasDirtyJobResultEntryInternal

        protected abstract boolean hasDirtyJobResultEntryInternal​(JobID jobId)
                                                           throws IOException
        Throws:
        IOException
      • hasCleanJobResultEntryAsync

        public CompletableFuture<Boolean> hasCleanJobResultEntryAsync​(JobID jobId)
        Description copied from interface: JobResultStore
        Returns the future of whether the store contains a clean entry for the given JobID.
        Specified by:
        hasCleanJobResultEntryAsync in interface JobResultStore
        Parameters:
        jobId - Ident of the job we wish to check the store for.
        Returns:
        a successfully completed future with true, if a clean entry exists for the given JobID; otherwise a successfully completed future with false.
      • hasCleanJobResultEntryInternal

        protected abstract boolean hasCleanJobResultEntryInternal​(JobID jobId)
                                                           throws IOException
        Throws:
        IOException
      • getDirtyResults

        public Set<JobResult> getDirtyResults()
                                       throws IOException
        Description copied from interface: JobResultStore
        Get the persisted JobResult instances that are marked as dirty. This is useful for recovery of finalization steps.
        Specified by:
        getDirtyResults in interface JobResultStore
        Returns:
        A set of dirty JobResults from the store.
        Throws:
        IOException - if collecting the set of dirty results failed for IO reasons.