Interface MerlinDatabaseService.WriterRole

All Known Subinterfaces:
MerlinDatabaseService.OwnerRole
All Known Implementing Classes:
GraphQLMerlinDatabaseService
Enclosing interface:
MerlinDatabaseService

public static interface MerlinDatabaseService.WriterRole
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete all the activity instances stored in the target plan container the plan revision will change!
    Map<gov.nasa.jpl.aerie.types.ActivityDirectiveId,gov.nasa.jpl.aerie.types.ActivityDirectiveId>
    createAllPlanActivityDirectives(PlanId planId, gov.nasa.jpl.aerie.scheduler.model.Plan plan, Map<gov.nasa.jpl.aerie.scheduler.model.SchedulingActivity,gov.nasa.jpl.aerie.scheduler.model.GoalId> activityToGoalId, gov.nasa.jpl.aerie.merlin.protocol.model.SchedulerModel schedulerModel)
    create activity instances in the target plan container for each activity in the input plan does not attempt to resolve id clashes or do activity instance updates the plan revision will change!
    createEmptyPlan(String name, long modelId, Instant startTime, gov.nasa.jpl.aerie.merlin.protocol.types.Duration duration)
    create a new empty plan container based on specifications does not attach a scheduling specification to the plan!
    org.apache.commons.lang3.tuple.Pair<PlanId,Map<gov.nasa.jpl.aerie.types.ActivityDirectiveId,gov.nasa.jpl.aerie.types.ActivityDirectiveId>>
    createNewPlanWithActivityDirectives(PlanMetadata planMetadata, gov.nasa.jpl.aerie.scheduler.model.Plan plan, Map<gov.nasa.jpl.aerie.scheduler.model.SchedulingActivity,gov.nasa.jpl.aerie.scheduler.model.GoalId> activityToGoalId, gov.nasa.jpl.aerie.merlin.protocol.model.SchedulerModel schedulerModel)
    create an entirely new plan container in aerie and synchronize the in-memory plan to it does not mutate the original plan, so metadata remains valid for the original plan
    storeSimulationResults(PlanMetadata planMetadata, gov.nasa.jpl.aerie.merlin.driver.SimulationResults results, Map<gov.nasa.jpl.aerie.types.ActivityDirectiveId,gov.nasa.jpl.aerie.types.ActivityDirectiveId> uploadIdMap)
    Stores the simulation results produced during scheduling
    Map<gov.nasa.jpl.aerie.types.ActivityDirectiveId,gov.nasa.jpl.aerie.types.ActivityDirectiveId>
    updatePlanActivityDirectives(PlanId planId, MerlinPlan initialPlan, gov.nasa.jpl.aerie.scheduler.model.Plan plan, Map<gov.nasa.jpl.aerie.scheduler.model.SchedulingActivity,gov.nasa.jpl.aerie.scheduler.model.GoalId> activityToGoalId, gov.nasa.jpl.aerie.merlin.protocol.model.SchedulerModel schedulerModel)
    synchronize the in-memory plan back over to aerie data stores via update operations the plan revision will change!
  • Method Details

    • createNewPlanWithActivityDirectives

      org.apache.commons.lang3.tuple.Pair<PlanId,Map<gov.nasa.jpl.aerie.types.ActivityDirectiveId,gov.nasa.jpl.aerie.types.ActivityDirectiveId>> createNewPlanWithActivityDirectives(PlanMetadata planMetadata, gov.nasa.jpl.aerie.scheduler.model.Plan plan, Map<gov.nasa.jpl.aerie.scheduler.model.SchedulingActivity,gov.nasa.jpl.aerie.scheduler.model.GoalId> activityToGoalId, gov.nasa.jpl.aerie.merlin.protocol.model.SchedulerModel schedulerModel) throws IOException, NoSuchPlanException, MerlinServiceException
      create an entirely new plan container in aerie and synchronize the in-memory plan to it does not mutate the original plan, so metadata remains valid for the original plan
      Parameters:
      planMetadata - identifying details of a plan to emulate in creating new container. id is ignored.
      plan - plan with all activity instances that should be stored to target merlin plan container
      Returns:
      the database id of the newly created aerie plan container
      Throws:
      NoSuchPlanException - when the plan container could not be found in aerie after creation
      IOException
      MerlinServiceException
    • createEmptyPlan

      PlanId createEmptyPlan(String name, long modelId, Instant startTime, gov.nasa.jpl.aerie.merlin.protocol.types.Duration duration) throws IOException, NoSuchPlanException, MerlinServiceException
      create a new empty plan container based on specifications does not attach a scheduling specification to the plan!
      Parameters:
      name - the human legible label for the new plan container to create
      modelId - the database identifier of the mission model to associate with the plan
      startTime - the absolute start time of the new plan container
      duration - the duration of the new plan container
      Returns:
      the database id of the newly created aerie plan container
      Throws:
      NoSuchPlanException - when the plan container could not be found in aerie after creation
      IOException
      MerlinServiceException
    • updatePlanActivityDirectives

      Map<gov.nasa.jpl.aerie.types.ActivityDirectiveId,gov.nasa.jpl.aerie.types.ActivityDirectiveId> updatePlanActivityDirectives(PlanId planId, MerlinPlan initialPlan, gov.nasa.jpl.aerie.scheduler.model.Plan plan, Map<gov.nasa.jpl.aerie.scheduler.model.SchedulingActivity,gov.nasa.jpl.aerie.scheduler.model.GoalId> activityToGoalId, gov.nasa.jpl.aerie.merlin.protocol.model.SchedulerModel schedulerModel) throws IOException, NoSuchPlanException, MerlinServiceException, NoSuchActivityInstanceException
      synchronize the in-memory plan back over to aerie data stores via update operations the plan revision will change!
      Parameters:
      planId - aerie database identifier of the target plan to synchronize into
      plan - plan with all activity instances that should be stored to target merlin plan container
      Returns:
      Throws:
      NoSuchPlanException - when the plan container does not exist in aerie
      IOException
      MerlinServiceException
      NoSuchActivityInstanceException
    • clearPlanActivityDirectives

      void clearPlanActivityDirectives(PlanId planId) throws IOException, NoSuchPlanException, MerlinServiceException
      delete all the activity instances stored in the target plan container the plan revision will change!
      Parameters:
      planId - the database id of the plan container to clear
      Throws:
      NoSuchPlanException - when the plan container does not exist in aerie
      IOException
      MerlinServiceException
    • createAllPlanActivityDirectives

      Map<gov.nasa.jpl.aerie.types.ActivityDirectiveId,gov.nasa.jpl.aerie.types.ActivityDirectiveId> createAllPlanActivityDirectives(PlanId planId, gov.nasa.jpl.aerie.scheduler.model.Plan plan, Map<gov.nasa.jpl.aerie.scheduler.model.SchedulingActivity,gov.nasa.jpl.aerie.scheduler.model.GoalId> activityToGoalId, gov.nasa.jpl.aerie.merlin.protocol.model.SchedulerModel schedulerModel) throws IOException, NoSuchPlanException, MerlinServiceException
      create activity instances in the target plan container for each activity in the input plan does not attempt to resolve id clashes or do activity instance updates the plan revision will change!
      Parameters:
      planId - the database id of the plan container to populate with new activity instances
      plan - the plan from which to copy all activity instances into aerie
      Returns:
      Throws:
      NoSuchPlanException - when the plan container does not exist in aerie
      IOException
      MerlinServiceException
    • storeSimulationResults

      DatasetId storeSimulationResults(PlanMetadata planMetadata, gov.nasa.jpl.aerie.merlin.driver.SimulationResults results, Map<gov.nasa.jpl.aerie.types.ActivityDirectiveId,gov.nasa.jpl.aerie.types.ActivityDirectiveId> uploadIdMap) throws MerlinServiceException, IOException
      Stores the simulation results produced during scheduling
      Parameters:
      planMetadata - the plan metadata
      results - the simulation results
      Throws:
      MerlinServiceException
      IOException