public class IdentityTranslator extends Object implements AddressTranslator
AddressTranslator
used by the driver that do no
translation.Constructor and Description |
---|
IdentityTranslator() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Called at
Cluster shutdown. |
void |
init(Cluster cluster)
Initializes this address translator.
|
InetSocketAddress |
translate(InetSocketAddress address)
Translates a Cassandra
rpc_address to another address if necessary. |
public void init(Cluster cluster)
AddressTranslator
init
in interface AddressTranslator
cluster
- the Cluster
instance for which the translator is created.public InetSocketAddress translate(InetSocketAddress address)
rpc_address
to another address if necessary.
This method is the identity function, it always return the address passed in argument, doing no translation.
translate
in interface AddressTranslator
address
- the address of a node as returned by Cassandra.address
unmodified.public void close()
AddressTranslator
Cluster
shutdown.close
in interface AddressTranslator
Copyright © 2012–2015. All rights reserved.