Package org.yamcs.utils
Class ServiceUtil
- java.lang.Object
-
- org.yamcs.utils.ServiceUtil
-
public class ServiceUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description ServiceUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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)
-
-
-
Method Detail
-
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)
-
-