Klasse ProductionPlanner

java.lang.Object
de.dlr.proseo.planner.ProductionPlanner
Alle implementierten Schnittstellen:
org.springframework.boot.CommandLineRunner

@SpringBootApplication @EnableConfigurationProperties @ComponentScan(basePackages="de.dlr.proseo") @EnableJpaRepositories("de.dlr.proseo.model.dao") public class ProductionPlanner extends Object implements org.springframework.boot.CommandLineRunner
prosEO planner application
Autor:
Ernst Melchinger
  • Felddetails

    • jobNamePrefix

      public static final String jobNamePrefix
      Siehe auch:
    • jobContainerPrefix

      public static final String jobContainerPrefix
      Siehe auch:
    • hostName

      public static String hostName
    • hostIP

      public static String hostIP
    • port

      public static String port
    • PLAN_THREAD_PREFIX

      public static String PLAN_THREAD_PREFIX
    • RELEASE_THREAD_PREFIX

      public static String RELEASE_THREAD_PREFIX
    • STATE_MESSAGE_COMPLETED

      public static String STATE_MESSAGE_COMPLETED
    • STATE_MESSAGE_QUEUED

      public static String STATE_MESSAGE_QUEUED
    • STATE_MESSAGE_RUNNING

      public static String STATE_MESSAGE_RUNNING
    • STATE_MESSAGE_CANCELLED

      public static String STATE_MESSAGE_CANCELLED
    • STATE_MESSAGE_FAILED

      public static String STATE_MESSAGE_FAILED
    • STATE_MESSAGE_NO_INPUT_AVAILABLE

      public static String STATE_MESSAGE_NO_INPUT_AVAILABLE
    • STATE_MESSAGE_NO_INPUT

      public static String STATE_MESSAGE_NO_INPUT
    • config

      public static ProductionPlannerConfiguration config
      The static production planner configuration
    • productionPlanner

      public static ProductionPlanner productionPlanner
      The production planner instance
    • plannerConfig

      @Autowired ProductionPlannerConfiguration plannerConfig
      The instance production planner configuration
  • Konstruktordetails

    • ProductionPlanner

      public ProductionPlanner()
  • Methodendetails

    • getFinishThreads

      public Map<String,KubeJobFinish> getFinishThreads()
      Gets the finishThreads map.
      Gibt zurück:
      The map of finishing threads.
    • getSuspendingOrders

      public List<Long> getSuspendingOrders()
      Gets the suspendingOrders list.
      Gibt zurück:
      The list of suspending orders.
    • getReleasingOrders

      public List<Long> getReleasingOrders()
      Gets the releasingOrders list.
      Gibt zurück:
      The list of releasing orders.
    • getPlanningOrders

      public List<Long> getPlanningOrders()
      Gets the planningOrders list.
      Gibt zurück:
      The list of planning orders.
    • getPlanThreads

      public Map<String,OrderPlanThread> getPlanThreads()
      Gets the planThreads map.
      Gibt zurück:
      The map of planning threads.
    • getReleaseThreads

      public Map<String,OrderReleaseThread> getReleaseThreads()
      Gets the releaseThreads map.
      Gibt zurück:
      The map of release threads.
    • getTxManager

      public org.springframework.transaction.PlatformTransactionManager getTxManager()
      Gets the transaction manger.
      Gibt zurück:
      The PlatformTransactionManager instance.
    • getEm

      public javax.persistence.EntityManager getEm()
      Gets the entity manager.
      Gibt zurück:
      The EntityManager instance.
    • getAuth

      public Map<String,String> getAuth(Long orderId)
      Gets the authentication details of an order (username and password).
      Parameter:
      orderId - The ID of the order.
      Gibt zurück:
      The authentication details.
    • updateAuth

      public void updateAuth(Long orderId, String user, String pw)
      Updates authentication details for an order).
      Parameter:
      orderId - The ID of the order.
      user - The username.
      pw - The password.
    • getKubeConfig

      public KubeConfig getKubeConfig(String name)
      Gets the KubeConfig instance by name.
      Parameter:
      name - The name of the KubeConfig instance (may be null).
      Gibt zurück:
      The KubeConfig instance.
    • getKubeConfigs

      public Collection<KubeConfig> getKubeConfigs()
      Gets all connected KubeConfig instances.
      Gibt zurück:
      Collection of KubeConfig instances.
    • main

      public static void main(String[] args) throws Exception
      Main method to start the application.
      Parameter:
      args - Command line arguments.
      Löst aus:
      Exception - Exception if an error occurs.
    • updateKubeConfigs

      @Transactional(isolation=REPEATABLE_READ, readOnly=true) public void updateKubeConfigs()
      Walk through ProcessingFacility list of DB and try to connect each. Disconnect and remove KubeConfigs not defined in this list.
    • updateKubeConfig

      @Transactional(isolation=REPEATABLE_READ, readOnly=true) public KubeConfig updateKubeConfig(String facilityName)
      Attempts to connect to a processing facility. Adds a new Kubernetes configuration for the previously not connected facility, removes Kubernetes configuration for a facility to which a connection is not possible.
      Parameter:
      facilityName - the name of the processing facility to connect
      Gibt zurück:
      the KubeConfig object for this processing facility, or null, if the facility is not connected
    • checkNextForRestart

      public void checkNextForRestart()
      Checks for the next order to restart.
    • run

      public void run(String... arg0) throws Exception
      Runs the application, initializing necessary configurations and components.
      Angegeben von:
      run in Schnittstelle org.springframework.boot.CommandLineRunner
      Parameter:
      arg0 - Command line arguments.
      Löst aus:
      Exception - If an error occurs during execution.
      Siehe auch:
      • CommandLineRunner.run(java.lang.String[])
    • startDispatcher

      public void startDispatcher()
      Starts the Kubernetes dispatcher thread.
    • stopDispatcher

      public void stopDispatcher()
      Stops the Kubernetes dispatcher thread.