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
  • Felddetails

    • jobNamePrefix

      public static final String jobNamePrefix
      Some constant definition for public use.
      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
    • productionPlanner

      public static ProductionPlanner productionPlanner
    • plannerConfig

      @Autowired ProductionPlannerConfiguration plannerConfig
      Planner configuration
  • Konstruktordetails

    • ProductionPlanner

      public ProductionPlanner()
  • Methodendetails

    • getFinishThreads

      public Map<String,KubeJobFinish> getFinishThreads()
      Gibt zurück:
      the finishThreads
    • getSuspendingOrders

      public List<Long> getSuspendingOrders()
      Gibt zurück:
      the suspendingOrders
    • getReleasingOrders

      public List<Long> getReleasingOrders()
      Gibt zurück:
      the releasingOrders
    • getPlanningOrders

      public List<Long> getPlanningOrders()
      Gibt zurück:
      the planningOrders
    • getPlanThreads

      public Map<String,OrderPlanThread> getPlanThreads()
      Gibt zurück:
      the planThreads
    • getReleaseThreads

      public Map<String,OrderReleaseThread> getReleaseThreads()
      Gibt zurück:
      the releaseThreads
    • getTxManager

      public org.springframework.transaction.PlatformTransactionManager getTxManager()
      Gibt zurück:
      the txManager
    • getEm

      public javax.persistence.EntityManager getEm()
      Gibt zurück:
      the em
    • getAuth

      public Map<String,String> getAuth(Long orderId)
      Get the user/pw for processing order
      Parameter:
      orderId - Id of order
      Gibt zurück:
      user/pw
    • updateAuth

      public void updateAuth(Long orderId, String user, String pw)
      Set or update user/pw of a processing order
      Parameter:
      orderId -
      user -
      pw -
    • getKubeConfig

      public KubeConfig getKubeConfig(String name)
      Look for connected KubeConfig of name.
      Parameter:
      name - of KubeConfig to find (may be null)
      Gibt zurück:
      KubeConfig found or null
    • getKubeConfigs

      public Collection<KubeConfig> getKubeConfigs()
      Gibt zurück:
      the collection of KubeConfigs which are connected.
    • main

      public static void main(String[] args) throws Exception
      Initialize and run application
      Parameter:
      args - command line arguments
      Löst aus:
      Exception
    • 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)
      Try to connect processing facility. Add new kube config for not connected facility, remove kube config for not connectable facility.
      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()
      Dispatch checkNextForRestart to UtilService
    • run

      public void run(String... arg0) throws Exception
      Angegeben von:
      run in Schnittstelle org.springframework.boot.CommandLineRunner
      Löst aus:
      Exception
    • startDispatcher

      public void startDispatcher()
      Start the kube dispatcher thread
    • stopDispatcher

      public void stopDispatcher()
      Stop the kube dispatcher thread