public class EC2MultiRegionAddressTranslator extends Object implements AddressTranslator
AddressTranslatorimplementation for a multi-region EC2 deployment where clients are also deployed in EC2. Its distinctive feature is that it translates addresses according to the location of the Cassandra host:
|Constructor and Description|
|Modifier and Type||Method and Description|
Initializes this address translator.
Translates a Cassandra
public void init(Cluster cluster)
public InetSocketAddress translate(InetSocketAddress socketAddress)
rpc_addressto another address if necessary.
socketAddress- the address of a node as returned by Cassandra. Note that if the
rpc_addressof a node has been configured to
0.0.0.0server side, then the provided address will be the node
0.0.0.0. Also note that the port for
InetSocketAddresswill always be the one set at Cluster construction time (9042 by default).
address. If the return is
addresswill be used by the driver (it is thus equivalent to returning
Copyright © 2012–2018. All rights reserved.