Package org.yamcs.utils
Class ServiceUtil
java.lang.Object
org.yamcs.utils.ServiceUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
awaitServiceRunning
(com.google.common.util.concurrent.Service service) Awaits a service to be running but throw anUncheckedExecutionException
instead of anIllegalStateException
static void
awaitServiceTerminated
(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 anUncheckedExecutionException
instead of anIllegalStateException
To 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)
-