com.datastax.driver.core.policies.Policies.getAddressTranslator()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(151)

本文整理了Java中com.datastax.driver.core.policies.Policies.getAddressTranslator()方法的一些代码示例,展示了Policies.getAddressTranslator()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Policies.getAddressTranslator()方法的具体详情如下:
包路径:com.datastax.driver.core.policies.Policies
类名称:Policies
方法名:getAddressTranslator

Policies.getAddressTranslator介绍

[英]The address translator in use.
[中]地址转换器正在使用中。

代码示例

代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core

InetSocketAddress translateAddress(InetSocketAddress address) {
 InetSocketAddress translated =
   configuration.getPolicies().getAddressTranslator().translate(address);
 return translated == null ? address : translated;
}

代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core

configuration.getPolicies().getRetryPolicy().close();
reconnectionPolicy().close();
configuration.getPolicies().getAddressTranslator().close();
for (LatencyTracker tracker : latencyTrackers) tracker.onUnregister(Cluster.this);
for (Host.StateListener listener : listeners) listener.onUnregister(Cluster.this);

代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core

configuration.getPolicies().getRetryPolicy().init(Cluster.this);
reconnectionPolicy().init(Cluster.this);
configuration.getPolicies().getAddressTranslator().init(Cluster.this);
for (LatencyTracker tracker : latencyTrackers) tracker.onRegister(Cluster.this);
for (Host.StateListener listener : listeners) listener.onRegister(Cluster.this);

代码示例来源:origin: com.yugabyte/cassandra-driver-core

InetSocketAddress translateAddress(InetAddress address) {
  InetSocketAddress sa = new InetSocketAddress(address, connectionFactory.getPort());
  InetSocketAddress translated = configuration.getPolicies().getAddressTranslator().translate(sa);
  return translated == null ? sa : translated;
}

代码示例来源:origin: io.prestosql.cassandra/cassandra-driver

InetSocketAddress translateAddress(InetAddress address) {
  InetSocketAddress sa = new InetSocketAddress(address, connectionFactory.getPort());
  InetSocketAddress translated = configuration.getPolicies().getAddressTranslator().translate(sa);
  return translated == null ? sa : translated;
}

代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver

InetSocketAddress translateAddress(InetAddress address) {
  InetSocketAddress sa = new InetSocketAddress(address, connectionFactory.getPort());
  InetSocketAddress translated = configuration.getPolicies().getAddressTranslator().translate(sa);
  return translated == null ? sa : translated;
}

代码示例来源:origin: io.prestosql.cassandra/cassandra-driver

configuration.getPolicies().getRetryPolicy().close();
reconnectionPolicy().close();
configuration.getPolicies().getAddressTranslator().close();
for (LatencyTracker tracker : latencyTrackers)
  tracker.onUnregister(Cluster.this);

代码示例来源:origin: com.yugabyte/cassandra-driver-core

configuration.getPolicies().getRetryPolicy().close();
reconnectionPolicy().close();
configuration.getPolicies().getAddressTranslator().close();
for (LatencyTracker tracker : latencyTrackers)
  tracker.onUnregister(Cluster.this);

代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver

configuration.getPolicies().getRetryPolicy().close();
reconnectionPolicy().close();
configuration.getPolicies().getAddressTranslator().close();
for (LatencyTracker tracker : latencyTrackers)
  tracker.onUnregister(Cluster.this);

代码示例来源:origin: com.yugabyte/cassandra-driver-core

configuration.getPolicies().getRetryPolicy().init(Cluster.this);
reconnectionPolicy().init(Cluster.this);
configuration.getPolicies().getAddressTranslator().init(Cluster.this);
for (LatencyTracker tracker : latencyTrackers)
  tracker.onRegister(Cluster.this);

代码示例来源:origin: com.github.ddth/ddth-cql-utils

AddressTranslator at = policies != null ? policies.getAddressTranslator() : null;
if (at != null) {
  builder.withAddressTranslator(at);

代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver

configuration.getPolicies().getRetryPolicy().init(Cluster.this);
reconnectionPolicy().init(Cluster.this);
configuration.getPolicies().getAddressTranslator().init(Cluster.this);
for (LatencyTracker tracker : latencyTrackers)
  tracker.onRegister(Cluster.this);

代码示例来源:origin: io.prestosql.cassandra/cassandra-driver

configuration.getPolicies().getRetryPolicy().init(Cluster.this);
reconnectionPolicy().init(Cluster.this);
configuration.getPolicies().getAddressTranslator().init(Cluster.this);
for (LatencyTracker tracker : latencyTrackers)
  tracker.onRegister(Cluster.this);

相关文章