Record Class SynchronousSchedulerAgent

java.lang.Object
java.lang.Record
gov.nasa.jpl.aerie.scheduler.worker.services.SynchronousSchedulerAgent
Record Components:
merlinDatabaseService - interface for querying plan and mission model details from merlin
modelJarsDir - path to parent directory for mission model jars (interim backdoor jar file access)
outputMode - how the scheduling output should be returned to aerie (eg overwrite or new container)
All Implemented Interfaces:
gov.nasa.jpl.aerie.scheduler.server.services.SchedulerAgent

public record SynchronousSchedulerAgent(gov.nasa.jpl.aerie.scheduler.server.services.SpecificationService specificationService, gov.nasa.jpl.aerie.scheduler.server.services.MerlinDatabaseService.OwnerRole merlinDatabaseService, Path modelJarsDir, gov.nasa.jpl.aerie.scheduler.server.config.PlanOutputMode outputMode, SchedulingDSLCompilationService schedulingDSLCompilationService) extends Record implements gov.nasa.jpl.aerie.scheduler.server.services.SchedulerAgent
agent that handles posed scheduling requests by blocking the requester thread until scheduling is complete
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    SynchronousSchedulerAgent(gov.nasa.jpl.aerie.scheduler.server.services.SpecificationService specificationService, gov.nasa.jpl.aerie.scheduler.server.services.MerlinDatabaseService.OwnerRole merlinDatabaseService, Path modelJarsDir, gov.nasa.jpl.aerie.scheduler.server.config.PlanOutputMode outputMode, SchedulingDSLCompilationService schedulingDSLCompilationService)
    Creates an instance of a SynchronousSchedulerAgent record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    static List<gov.nasa.jpl.aerie.scheduler.model.SchedulingCondition>
    conditionBuilder(gov.nasa.jpl.aerie.scheduler.server.models.SchedulingDSL.ConditionSpecifier conditionSpecifier, gov.nasa.jpl.aerie.scheduler.model.Problem problem)
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    static String
    getImplementingClassName(Path jarPath, String name, String version)
     
    final int
    Returns a hash code value for this object.
    static gov.nasa.jpl.aerie.merlin.protocol.model.SchedulerPlugin
     
    gov.nasa.jpl.aerie.scheduler.server.services.MerlinDatabaseService.OwnerRole
    Returns the value of the merlinDatabaseService record component.
    Returns the value of the modelJarsDir record component.
    gov.nasa.jpl.aerie.scheduler.server.config.PlanOutputMode
    Returns the value of the outputMode record component.
    void
    schedule(gov.nasa.jpl.aerie.scheduler.server.services.ScheduleRequest request, gov.nasa.jpl.aerie.scheduler.server.ResultsProtocol.WriterRole writer, Supplier<Boolean> canceledListener, int sizeCachedEngineStore)
    consumes any ResultsProtocolFailure exception generated by the scheduling process and writes its message as a failure reason to the given output port (eg aerie could not be reached, mission model could not be loaded from jar file, requested plan revision has changed in the database, scheduler could not find a solution, etc).
    Returns the value of the schedulingDSLCompilationService record component.
    gov.nasa.jpl.aerie.scheduler.server.services.SpecificationService
    Returns the value of the specificationService record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • SynchronousSchedulerAgent

      public SynchronousSchedulerAgent(gov.nasa.jpl.aerie.scheduler.server.services.SpecificationService specificationService, gov.nasa.jpl.aerie.scheduler.server.services.MerlinDatabaseService.OwnerRole merlinDatabaseService, Path modelJarsDir, gov.nasa.jpl.aerie.scheduler.server.config.PlanOutputMode outputMode, SchedulingDSLCompilationService schedulingDSLCompilationService)
      Creates an instance of a SynchronousSchedulerAgent record class.
      Parameters:
      specificationService - the value for the specificationService record component
      merlinDatabaseService - the value for the merlinDatabaseService record component
      modelJarsDir - the value for the modelJarsDir record component
      outputMode - the value for the outputMode record component
      schedulingDSLCompilationService - the value for the schedulingDSLCompilationService record component
  • Method Details

    • schedule

      public void schedule(gov.nasa.jpl.aerie.scheduler.server.services.ScheduleRequest request, gov.nasa.jpl.aerie.scheduler.server.ResultsProtocol.WriterRole writer, Supplier<Boolean> canceledListener, int sizeCachedEngineStore)
      consumes any ResultsProtocolFailure exception generated by the scheduling process and writes its message as a failure reason to the given output port (eg aerie could not be reached, mission model could not be loaded from jar file, requested plan revision has changed in the database, scheduler could not find a solution, etc). Any remaining exceptions passed upward represent fatal service configuration problems
      Specified by:
      schedule in interface gov.nasa.jpl.aerie.scheduler.server.services.SchedulerAgent
    • loadSchedulerModelProvider

      public static gov.nasa.jpl.aerie.merlin.protocol.model.SchedulerPlugin loadSchedulerModelProvider(Path path, String name, String version) throws gov.nasa.jpl.aerie.merlin.driver.MissionModelLoader.MissionModelLoadException, SynchronousSchedulerAgent.SchedulerModelLoadException
      Throws:
      gov.nasa.jpl.aerie.merlin.driver.MissionModelLoader.MissionModelLoadException
      SynchronousSchedulerAgent.SchedulerModelLoadException
    • getImplementingClassName

      public static String getImplementingClassName(Path jarPath, String name, String version) throws SynchronousSchedulerAgent.SchedulerModelLoadException
      Throws:
      SynchronousSchedulerAgent.SchedulerModelLoadException
    • conditionBuilder

      public static List<gov.nasa.jpl.aerie.scheduler.model.SchedulingCondition> conditionBuilder(gov.nasa.jpl.aerie.scheduler.server.models.SchedulingDSL.ConditionSpecifier conditionSpecifier, gov.nasa.jpl.aerie.scheduler.model.Problem problem)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • specificationService

      public gov.nasa.jpl.aerie.scheduler.server.services.SpecificationService specificationService()
      Returns the value of the specificationService record component.
      Returns:
      the value of the specificationService record component
    • merlinDatabaseService

      public gov.nasa.jpl.aerie.scheduler.server.services.MerlinDatabaseService.OwnerRole merlinDatabaseService()
      Returns the value of the merlinDatabaseService record component.
      Returns:
      the value of the merlinDatabaseService record component
    • modelJarsDir

      public Path modelJarsDir()
      Returns the value of the modelJarsDir record component.
      Returns:
      the value of the modelJarsDir record component
    • outputMode

      public gov.nasa.jpl.aerie.scheduler.server.config.PlanOutputMode outputMode()
      Returns the value of the outputMode record component.
      Returns:
      the value of the outputMode record component
    • schedulingDSLCompilationService

      public SchedulingDSLCompilationService schedulingDSLCompilationService()
      Returns the value of the schedulingDSLCompilationService record component.
      Returns:
      the value of the schedulingDSLCompilationService record component