Class FileSystemPipelineOutputStore

java.lang.Object
nz.org.riskscape.engine.output.FileSystemPipelineOutputStore
All Implemented Interfaces:
nz.org.riskscape.engine.Identified, nz.org.riskscape.engine.output.PipelineOutputStore

public class FileSystemPipelineOutputStore extends Object implements nz.org.riskscape.engine.output.PipelineOutputStore

A PipelineOutputStore that writes results to files on the file system.

If the user specifies an output base URI then that is used as the directory in which results are saved. If not provided then the output base directory is PROJECTOUTPUTDIRECTORY/PIPELINE_ID/TIMESTAMP.

  • Field Summary

    Fields inherited from interface nz.org.riskscape.engine.output.PipelineOutputStore

    PRIORITY_DEFAULT, PRIORITY_HIGH, PRIORITY_NA
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
     
    protected
    Test constructor allowing control of the current time.
  • Method Summary

    Modifier and Type
    Method
    Description
    nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.output.PipelineOutputContainer>
    create(URI outputLocation, nz.org.riskscape.engine.pipeline.RealizedPipeline pipeline, nz.org.riskscape.engine.output.PipelineOutputOptions options)
     
     
    int
    isApplicable(URI outputLocation)
     
    void
    onCompletion(Consumer<nz.org.riskscape.engine.output.FileSystemPipelineOutputStore.FileSystemPipelineContainer> action)
    Register an action to perform once a FileSystemPipelineContainer has completed saving all the output data.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface nz.org.riskscape.engine.Identified

    getIdentifiedClass

    Methods inherited from interface nz.org.riskscape.engine.output.PipelineOutputStore

    newOutputOptions
  • Constructor Details

    • FileSystemPipelineOutputStore

      public FileSystemPipelineOutputStore()
    • FileSystemPipelineOutputStore

      protected FileSystemPipelineOutputStore(Supplier<LocalDateTime> currentTime)

      Test constructor allowing control of the current time.

  • Method Details

    • isApplicable

      public int isApplicable(URI outputLocation)
      Specified by:
      isApplicable in interface nz.org.riskscape.engine.output.PipelineOutputStore
    • create

      public nz.org.riskscape.problem.ResultOrProblems<nz.org.riskscape.engine.output.PipelineOutputContainer> create(URI outputLocation, nz.org.riskscape.engine.pipeline.RealizedPipeline pipeline, nz.org.riskscape.engine.output.PipelineOutputOptions options)
      Specified by:
      create in interface nz.org.riskscape.engine.output.PipelineOutputStore
    • onCompletion

      public void onCompletion(Consumer<nz.org.riskscape.engine.output.FileSystemPipelineOutputStore.FileSystemPipelineContainer> action)

      Register an action to perform once a FileSystemPipelineContainer has completed saving all the output data.

    • getId

      public String getId()
      Specified by:
      getId in interface nz.org.riskscape.engine.Identified