Package com.slave.application.services
Class SlaveServiceImpl
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
com.slave.application.services.SlaveServiceImpl
- All Implemented Interfaces:
SlaveService,Serializable,Remote
- Direct Known Subclasses:
Slave
Slave Service Implementation
This class implements the remote interface methods.
- Version:
- 1.0
- Author:
- Bruno Guiomar
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate OperatingSystemMXBeanprivate Stringprivate StringFields inherited from class java.rmi.server.RemoteObject
ref -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks the status of a connected DECS-Slave instanceRetrieves the system information of the slave instancebooleansetupProblemEnvironment(ArrayList<JobFile> jobFiles, String problemCode, String distribution) Sets up the execution environment in the Slave instancebooleanstartInference(String problemCode) Starts the inference process on each connected slavebooleanStops the inference process on each connected slaveMethods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, exportObject, unexportObjectMethods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
-
Field Details
-
distribution
-
problemCode
-
operatingSystemMXBean
-
slaveAddress
-
-
Constructor Details
-
SlaveServiceImpl
Class Constructor- Parameters:
slaveAddress- Slave network address (IP)- Throws:
RemoteException- If the slave instance cannot be reached or any communication error is raised.
-
-
Method Details
-
checkStatus
public boolean checkStatus()Description copied from interface:SlaveServiceChecks the status of a connected DECS-Slave instance- Specified by:
checkStatusin interfaceSlaveService- Returns:
- Liveliness of the node
-
getSystemInformation
Description copied from interface:SlaveServiceRetrieves the system information of the slave instance- Specified by:
getSystemInformationin interfaceSlaveService- Returns:
- System information object
-
setupProblemEnvironment
public boolean setupProblemEnvironment(ArrayList<JobFile> jobFiles, String problemCode, String distribution) Description copied from interface:SlaveServiceSets up the execution environment in the Slave instance- Specified by:
setupProblemEnvironmentin interfaceSlaveService- Parameters:
jobFiles- List of the files to be transferedproblemCode- Problem short codedistribution- Problem distribution type- Returns:
- Status of the operation
-
startInference
Description copied from interface:SlaveServiceStarts the inference process on each connected slave- Specified by:
startInferencein interfaceSlaveService- Parameters:
problemCode- Problem short code- Returns:
- Status of the operation
-
stopInference
public boolean stopInference()Description copied from interface:SlaveServiceStops the inference process on each connected slave- Specified by:
stopInferencein interfaceSlaveService- Returns:
- Status of the operation
-