Class IdentityTranslator
- java.lang.Object
-
- com.datastax.driver.core.policies.IdentityTranslator
-
- All Implemented Interfaces:
AddressTranslator
public class IdentityTranslator extends Object implements AddressTranslator
The defaultAddressTranslatorused by the driver that do no translation.
-
-
Constructor Summary
Constructors Constructor Description IdentityTranslator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Called atClustershutdown.voidinit(Cluster cluster)Initializes this address translator.InetSocketAddresstranslate(InetSocketAddress address)Translates a Cassandrarpc_addressto another address if necessary.
-
-
-
Method Detail
-
init
public void init(Cluster cluster)
Description copied from interface:AddressTranslatorInitializes this address translator.- Specified by:
initin interfaceAddressTranslator- Parameters:
cluster- theClusterinstance for which the translator is created.
-
translate
public InetSocketAddress translate(InetSocketAddress address)
Translates a Cassandrarpc_addressto another address if necessary.This method is the identity function, it always return the address passed in argument, doing no translation.
- Specified by:
translatein interfaceAddressTranslator- Parameters:
address- the address of a node as returned by Cassandra.- Returns:
addressunmodified.
-
close
public void close()
Description copied from interface:AddressTranslatorCalled atClustershutdown.- Specified by:
closein interfaceAddressTranslator
-
-