Package org.yamcs.utils
Class ServiceUtil
java.lang.Object
org.yamcs.utils.ServiceUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidawaitServiceRunning(com.google.common.util.concurrent.Service service) Awaits a service to be running but throw anUncheckedExecutionExceptioninstead of anIllegalStateExceptionstatic voidawaitServiceTerminated(com.google.common.util.concurrent.Service service, int numSeconds, Log log)
-
Constructor Details
-
ServiceUtil
public ServiceUtil()
-
-
Method Details
-
awaitServiceRunning
public static void awaitServiceRunning(com.google.common.util.concurrent.Service service) Awaits a service to be running but throw anUncheckedExecutionExceptioninstead of anIllegalStateExceptionTo be used when the only reason for a service not to be in the RUNNING state is because it failed to start (not because an illegal state transition has been attempted)
- Parameters:
service-
-
awaitServiceTerminated
public static void awaitServiceTerminated(com.google.common.util.concurrent.Service service, int numSeconds, Log log)
-