public class AkkaRpcServiceUtils extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AkkaRpcServiceUtils.AkkaProtocol
Whether to use TCP or encrypted TCP for Akka.
|
static class |
AkkaRpcServiceUtils.AkkaRpcServiceBuilder
Builder for
AkkaRpcService . |
public static AkkaRpcService createRemoteRpcService(Configuration configuration, @Nullable String externalAddress, String externalPortRange, @Nullable String bindAddress, Optional<Integer> bindPort) throws Exception
Exception
public static AkkaRpcServiceUtils.AkkaRpcServiceBuilder remoteServiceBuilder(Configuration configuration, @Nullable String externalAddress, String externalPortRange)
@VisibleForTesting public static AkkaRpcServiceUtils.AkkaRpcServiceBuilder remoteServiceBuilder(Configuration configuration, @Nullable String externalAddress, int externalPort)
public static AkkaRpcServiceUtils.AkkaRpcServiceBuilder localServiceBuilder(Configuration configuration)
public static String getRpcUrl(String hostname, int port, String endpointName, HighAvailabilityServicesUtils.AddressResolution addressResolution, Configuration config) throws UnknownHostException
hostname
- The hostname or address where the target RPC service is listening.port
- The port where the target RPC service is listening.endpointName
- The name of the RPC endpoint.addressResolution
- Whether to try address resolution of the given hostname or not. This
allows to fail fast in case that the hostname cannot be resolved.config
- The configuration from which to deduce further settings.UnknownHostException
public static String getRpcUrl(String hostname, int port, String endpointName, HighAvailabilityServicesUtils.AddressResolution addressResolution, AkkaRpcServiceUtils.AkkaProtocol akkaProtocol) throws UnknownHostException
hostname
- The hostname or address where the target RPC service is listening.port
- The port where the target RPC service is listening.endpointName
- The name of the RPC endpoint.addressResolution
- Whether to try address resolution of the given hostname or not. This
allows to fail fast in case that the hostname cannot be resolved.akkaProtocol
- True, if security/encryption is enabled, false otherwise.UnknownHostException
public static String createRandomName(String prefix)
prefix
- Prefix string to prepend to the monotonically increasing name offset numberpublic static String createWildcardName(String prefix)
createRandomName(String)
.prefix
- prefix of the wildcard namepublic static long extractMaximumFramesize(Configuration configuration)
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.