public class RpcUtils extends Object
Modifier and Type | Field and Description |
---|---|
static Time |
INF_TIMEOUT |
Modifier and Type | Method and Description |
---|---|
static Set<Class<? extends RpcGateway>> |
extractImplementedRpcGateways(Class<?> clazz)
Extracts all
RpcGateway interfaces implemented by the given clazz. |
static void |
terminateRpcEndpoint(RpcEndpoint rpcEndpoint,
Time timeout)
Shuts the given
RpcEndpoint down and awaits its termination. |
public static final Time INF_TIMEOUT
public static Set<Class<? extends RpcGateway>> extractImplementedRpcGateways(Class<?> clazz)
RpcGateway
interfaces implemented by the given clazz.clazz
- from which to extract the implemented RpcGateway interfacespublic static void terminateRpcEndpoint(RpcEndpoint rpcEndpoint, Time timeout) throws ExecutionException, InterruptedException, TimeoutException
RpcEndpoint
down and awaits its termination.rpcEndpoint
- to terminatetimeout
- for this operationExecutionException
- if a problem occursInterruptedException
- if the operation has been interruptedTimeoutException
- if a timeout occurredCopyright © 2014–2018 The Apache Software Foundation. All rights reserved.