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 merlinmodelJarsDir- 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 ClassesModifier and TypeClassDescriptionstatic class -
Constructor Summary
ConstructorsConstructorDescriptionSynchronousSchedulerAgent(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 aSynchronousSchedulerAgentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic 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 booleanIndicates whether some other object is "equal to" this one.static StringgetImplementingClassName(Path jarPath, String name, String version) final inthashCode()Returns a hash code value for this object.static gov.nasa.jpl.aerie.merlin.protocol.model.SchedulerPluginloadSchedulerModelProvider(Path path, String name, String version) gov.nasa.jpl.aerie.scheduler.server.services.MerlinDatabaseService.OwnerRoleReturns the value of themerlinDatabaseServicerecord component.Returns the value of themodelJarsDirrecord component.gov.nasa.jpl.aerie.scheduler.server.config.PlanOutputModeReturns the value of theoutputModerecord component.voidschedule(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 theschedulingDSLCompilationServicerecord component.gov.nasa.jpl.aerie.scheduler.server.services.SpecificationServiceReturns the value of thespecificationServicerecord component.final StringtoString()Returns a string representation of this record class.
-
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 aSynchronousSchedulerAgentrecord class.- Parameters:
specificationService- the value for thespecificationServicerecord componentmerlinDatabaseService- the value for themerlinDatabaseServicerecord componentmodelJarsDir- the value for themodelJarsDirrecord componentoutputMode- the value for theoutputModerecord componentschedulingDSLCompilationService- the value for theschedulingDSLCompilationServicerecord 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:
schedulein interfacegov.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.MissionModelLoadExceptionSynchronousSchedulerAgent.SchedulerModelLoadException
-
getImplementingClassName
public static String getImplementingClassName(Path jarPath, String name, String version) 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
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
specificationService
public gov.nasa.jpl.aerie.scheduler.server.services.SpecificationService specificationService()Returns the value of thespecificationServicerecord component.- Returns:
- the value of the
specificationServicerecord component
-
merlinDatabaseService
public gov.nasa.jpl.aerie.scheduler.server.services.MerlinDatabaseService.OwnerRole merlinDatabaseService()Returns the value of themerlinDatabaseServicerecord component.- Returns:
- the value of the
merlinDatabaseServicerecord component
-
modelJarsDir
Returns the value of themodelJarsDirrecord component.- Returns:
- the value of the
modelJarsDirrecord component
-
outputMode
public gov.nasa.jpl.aerie.scheduler.server.config.PlanOutputMode outputMode()Returns the value of theoutputModerecord component.- Returns:
- the value of the
outputModerecord component
-
schedulingDSLCompilationService
Returns the value of theschedulingDSLCompilationServicerecord component.- Returns:
- the value of the
schedulingDSLCompilationServicerecord component
-