Package de.dlr.proseo.planner
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
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungThe static production planner configurationstatic String
static String
static final String
static final String
static String
(Package privat) ProductionPlannerConfiguration
The instance production planner configurationstatic String
static ProductionPlanner
The production planner instancestatic String
static String
static String
static String
static String
static String
static String
static String
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
Checks for the next order to restart.Gets the authentication details of an order (username and password).javax.persistence.EntityManager
getEm()
Gets the entity manager.Gets the finishThreads map.getKubeConfig
(String name) Gets the KubeConfig instance by name.Gets all connected KubeConfig instances.Gets the planningOrders list.Gets the planThreads map.Gets the releaseThreads map.Gets the releasingOrders list.Gets the suspendingOrders list.org.springframework.transaction.PlatformTransactionManager
Gets the transaction manger.static void
Main method to start the application.void
Runs the application, initializing necessary configurations and components.void
Starts the Kubernetes dispatcher thread.void
Stops the Kubernetes dispatcher thread.void
updateAuth
(Long orderId, String user, String pw) Updates authentication details for an order).updateKubeConfig
(String facilityName) Attempts to connect to a processing facility.void
Walk through ProcessingFacility list of DB and try to connect each.
-
Felddetails
-
jobNamePrefix
- Siehe auch:
-
jobContainerPrefix
- Siehe auch:
-
hostName
-
hostIP
-
port
-
PLAN_THREAD_PREFIX
-
RELEASE_THREAD_PREFIX
-
STATE_MESSAGE_COMPLETED
-
STATE_MESSAGE_QUEUED
-
STATE_MESSAGE_RUNNING
-
STATE_MESSAGE_CANCELLED
-
STATE_MESSAGE_FAILED
-
STATE_MESSAGE_NO_INPUT_AVAILABLE
-
STATE_MESSAGE_NO_INPUT
-
config
The static production planner configuration -
productionPlanner
The production planner instance -
plannerConfig
The instance production planner configuration
-
-
Konstruktordetails
-
ProductionPlanner
public ProductionPlanner()
-
-
Methodendetails
-
getFinishThreads
Gets the finishThreads map.- Gibt zurück:
- The map of finishing threads.
-
getSuspendingOrders
Gets the suspendingOrders list.- Gibt zurück:
- The list of suspending orders.
-
getReleasingOrders
Gets the releasingOrders list.- Gibt zurück:
- The list of releasing orders.
-
getPlanningOrders
Gets the planningOrders list.- Gibt zurück:
- The list of planning orders.
-
getPlanThreads
Gets the planThreads map.- Gibt zurück:
- The map of planning threads.
-
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
Gets the authentication details of an order (username and password).- Parameter:
orderId
- The ID of the order.- Gibt zurück:
- The authentication details.
-
updateAuth
Updates authentication details for an order).- Parameter:
orderId
- The ID of the order.user
- The username.pw
- The password.
-
getKubeConfig
Gets the KubeConfig instance by name.- Parameter:
name
- The name of the KubeConfig instance (may be null).- Gibt zurück:
- The KubeConfig instance.
-
getKubeConfigs
Gets all connected KubeConfig instances.- Gibt zurück:
- Collection of KubeConfig instances.
-
main
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
Runs the application, initializing necessary configurations and components.- Angegeben von:
run
in Schnittstelleorg.springframework.boot.CommandLineRunner
- Parameter:
arg0
- Command line arguments.- Löst aus:
Exception
- If an error occurs during execution.- Siehe auch:
-
startDispatcher
public void startDispatcher()Starts the Kubernetes dispatcher thread. -
stopDispatcher
public void stopDispatcher()Stops the Kubernetes dispatcher thread.
-