Package es.bsc.dataclay.logic.server
Class LogicModuleSrv
- java.lang.Object
-
- es.bsc.dataclay.logic.server.LogicModuleSrv
-
public final class LogicModuleSrv extends Object
This class implements the service part of the Logic Module.
-
-
Field Summary
Fields Modifier and Type Field Description protected static boolean
DEBUG_ENABLED
boolean
running
Indicates if server is running.
-
Constructor Summary
Constructors Constructor Description LogicModuleSrv(CfgLogic thecfgLM)
LogicModuleSrv constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanMDCaches()
Clean MD cachesstatic void
doExit(int exitStatus)
static LogicModuleSrv
getForTest(String[] args)
String
getHostname()
Return the hostname of the LogicModule.LogicModule
getLogicModule()
int
getTcpPort()
Return the TCP Port for the LogicModule.static void
main(String[] args)
void
start()
Start service.void
stopService()
Unbinds the servicevoid
waitAndProcessAllAsyncRequests()
Wait for all asynchronous request to finish.
-
-
-
Constructor Detail
-
LogicModuleSrv
public LogicModuleSrv(CfgLogic thecfgLM) throws InterruptedException
LogicModuleSrv constructor- Parameters:
thecfgLM
- LM configuration- Throws:
InterruptedException
- if GRPC cannot be started
-
-
Method Detail
-
main
public static void main(String[] args) throws Exception
- Parameters:
args
- Containing the config file- Throws:
Exception
- if an exception occurs
-
start
public void start() throws Exception
Start service.- Throws:
Exception
- if some exception occurs
-
doExit
public static void doExit(int exitStatus)
-
stopService
public void stopService() throws Exception
Unbinds the service- Throws:
Exception
- if an exception occurs
-
cleanMDCaches
public void cleanMDCaches() throws Exception
Clean MD caches- Throws:
Exception
- if an exception occurs
-
getLogicModule
public LogicModule getLogicModule()
- Returns:
- the reference to LM
-
waitAndProcessAllAsyncRequests
public void waitAndProcessAllAsyncRequests()
Wait for all asynchronous request to finish.
-
getTcpPort
public int getTcpPort()
Return the TCP Port for the LogicModule.- Returns:
- The TCP port.
-
getHostname
public String getHostname()
Return the hostname of the LogicModule.- Returns:
- The hostname string.
-
getForTest
public static LogicModuleSrv getForTest(String[] args) throws Exception
- Parameters:
args
- args[0] == the manager configuration file path with the configuration for backends and so on- Returns:
- LogicModuleSrv for test.
- Throws:
Exception
- if some exception was thrown
-
-