congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Host.toString
Code IndexAdd Tabnine to your IDE (free)

How to use
toString
method
in
com.datastax.driver.core.Host

Best Java code snippets using com.datastax.driver.core.Host.toString (Showing top 18 results out of 315)

origin: kairosdb/kairosdb

private void printHosts(Iterator<Host> hostIterator)
{
  StringBuilder sb = new StringBuilder();
  while (hostIterator.hasNext())
  {
    sb.append(hostIterator.next().toString()).append(" ");
  }
  System.out.println(sb.toString());
}
origin: com.datastax.cassandra/cassandra-driver-core

 localDc = dc;
} else if (!dc.equals(localDc))
 notInLocalDC.add(String.format("%s (%s)", host.toString(), dc));
origin: com.datastax.cassandra/cassandra-driver-core

void startPeriodicReconnectionAttempt(final Host host, final boolean isHostAddition) {
 new AbstractReconnectionHandler(
   host.toString(),
   reconnectionExecutor,
   reconnectionPolicy().newSchedule(),
origin: com.datastax.cassandra/cassandra-driver-core

host.toString(),
reconnectionExecutor,
reconnectionPolicy().newSchedule(),
origin: com.englishtown/vertx-mod-cassandra

private String stringify(ConcurrentMap<String, Host> hosts) {
  StringBuilder sb = new StringBuilder();
  String delimiter = "";
  for (String key : hosts.keySet()) {
    Host host = hosts.get(key);
    if (host != null) {
      sb.append(delimiter)
          .append(host.toString())
          .append(" (dc=")
          .append(host.getDatacenter())
          .append(" up=")
          .append(host.isUp())
          .append(")");
      delimiter = "\n";
    }
  }
  return sb.toString();
}
origin: com.englishtown.vertx/vertx-cassandra

private String stringify(ConcurrentMap<String, Host> hosts) {
  StringBuilder sb = new StringBuilder();
  String delimiter = "";
  for (String key : hosts.keySet()) {
    Host host = hosts.get(key);
    if (host != null) {
      sb.append(delimiter)
          .append(host.toString())
          .append(" (dc=")
          .append(host.getDatacenter())
          .append(" up=")
          .append(host.isUp())
          .append(")");
      delimiter = "\n";
    }
  }
  return sb.toString();
}
origin: ef-labs/vertx-cassandra

private String stringify(ConcurrentMap<String, Host> hosts) {
  StringBuilder sb = new StringBuilder();
  String delimiter = "";
  for (String key : hosts.keySet()) {
    Host host = hosts.get(key);
    if (host != null) {
      sb.append(delimiter)
          .append(host.toString())
          .append(" (dc=")
          .append(host.getDatacenter())
          .append(" up=")
          .append(host.isUp())
          .append(")");
      delimiter = "\n";
    }
  }
  return sb.toString();
}
origin: com.yugabyte/cassandra-driver-core

@Override
public void init(Cluster cluster, Collection<Host> hosts) {
  if (localDc != UNSET)
    logger.info("Using provided data-center name '{}' for DCAwareRoundRobinPolicy", localDc);
  this.configuration = cluster.getConfiguration();
  ArrayList<String> notInLocalDC = new ArrayList<String>();
  for (Host host : hosts) {
    String dc = dc(host);
    // If the localDC was in "auto-discover" mode and it's the first host for which we have a DC, use it.
    if (localDc == UNSET && dc != UNSET) {
      logger.info("Using data-center name '{}' for DCAwareRoundRobinPolicy (if this is incorrect, please provide the correct datacenter name with DCAwareRoundRobinPolicy constructor)", dc);
      localDc = dc;
    } else if (!dc.equals(localDc))
      notInLocalDC.add(String.format("%s (%s)", host.toString(), dc));
    CopyOnWriteArrayList<Host> prev = perDcLiveHosts.get(dc);
    if (prev == null)
      perDcLiveHosts.put(dc, new CopyOnWriteArrayList<Host>(Collections.singletonList(host)));
    else
      prev.addIfAbsent(host);
  }
  if (notInLocalDC.size() > 0) {
    String nonLocalHosts = Joiner.on(",").join(notInLocalDC);
    logger.warn("Some contact points don't match local data center. Local DC = {}. Non-conforming contact points: {}", localDc, nonLocalHosts);
  }
  this.index.set(new Random().nextInt(Math.max(hosts.size(), 1)));
}
origin: com.facebook.presto.cassandra/cassandra-driver

@Override
public void init(Cluster cluster, Collection<Host> hosts) {
  if (localDc != UNSET)
    logger.info("Using provided data-center name '{}' for DCAwareRoundRobinPolicy", localDc);
  this.configuration = cluster.getConfiguration();
  ArrayList<String> notInLocalDC = new ArrayList<String>();
  for (Host host : hosts) {
    String dc = dc(host);
    // If the localDC was in "auto-discover" mode and it's the first host for which we have a DC, use it.
    if (localDc == UNSET && dc != UNSET) {
      logger.info("Using data-center name '{}' for DCAwareRoundRobinPolicy (if this is incorrect, please provide the correct datacenter name with DCAwareRoundRobinPolicy constructor)", dc);
      localDc = dc;
    } else if (!dc.equals(localDc))
      notInLocalDC.add(String.format("%s (%s)", host.toString(), dc));
    CopyOnWriteArrayList<Host> prev = perDcLiveHosts.get(dc);
    if (prev == null)
      perDcLiveHosts.put(dc, new CopyOnWriteArrayList<Host>(Collections.singletonList(host)));
    else
      prev.addIfAbsent(host);
  }
  if (notInLocalDC.size() > 0) {
    String nonLocalHosts = Joiner.on(",").join(notInLocalDC);
    logger.warn("Some contact points don't match local data center. Local DC = {}. Non-conforming contact points: {}", localDc, nonLocalHosts);
  }
  this.index.set(new Random().nextInt(Math.max(hosts.size(), 1)));
}
origin: io.prestosql.cassandra/cassandra-driver

@Override
public void init(Cluster cluster, Collection<Host> hosts) {
  if (localDc != UNSET)
    logger.info("Using provided data-center name '{}' for DCAwareRoundRobinPolicy", localDc);
  this.configuration = cluster.getConfiguration();
  ArrayList<String> notInLocalDC = new ArrayList<String>();
  for (Host host : hosts) {
    String dc = dc(host);
    // If the localDC was in "auto-discover" mode and it's the first host for which we have a DC, use it.
    if (localDc == UNSET && dc != UNSET) {
      logger.info("Using data-center name '{}' for DCAwareRoundRobinPolicy (if this is incorrect, please provide the correct datacenter name with DCAwareRoundRobinPolicy constructor)", dc);
      localDc = dc;
    } else if (!dc.equals(localDc))
      notInLocalDC.add(String.format("%s (%s)", host.toString(), dc));
    CopyOnWriteArrayList<Host> prev = perDcLiveHosts.get(dc);
    if (prev == null)
      perDcLiveHosts.put(dc, new CopyOnWriteArrayList<Host>(Collections.singletonList(host)));
    else
      prev.addIfAbsent(host);
  }
  if (notInLocalDC.size() > 0) {
    String nonLocalHosts = Joiner.on(",").join(notInLocalDC);
    logger.warn("Some contact points don't match local data center. Local DC = {}. Non-conforming contact points: {}", localDc, nonLocalHosts);
  }
  this.index.set(new Random().nextInt(Math.max(hosts.size(), 1)));
}
origin: com.ericsson.bss.cassandra.ecchronos/connection

notInLocalDC.add(String.format("%s (%s)", host.toString(), dc));
origin: bazaarvoice/emodb

  private ResultSet createPositiveResultSet(String hostName) {
    ExecutionInfo executionInfo = mock(ExecutionInfo.class);
    Host host = mock(Host.class);
    when(host.toString()).thenReturn(hostName);
    when(executionInfo.getQueriedHost()).thenReturn(host);
    ResultSet resultSet = mock(ResultSet.class);
    when(resultSet.getExecutionInfo()).thenReturn(executionInfo);
    return resultSet;
  }
}
origin: com.facebook.presto.cassandra/cassandra-driver

void startPeriodicReconnectionAttempt(final Host host, final boolean isHostAddition) {
  new AbstractReconnectionHandler(host.toString(), reconnectionExecutor, reconnectionPolicy().newSchedule(), host.reconnectionAttempt) {
origin: com.yugabyte/cassandra-driver-core

void startPeriodicReconnectionAttempt(final Host host, final boolean isHostAddition) {
  new AbstractReconnectionHandler(host.toString(), reconnectionExecutor, reconnectionPolicy().newSchedule(), host.reconnectionAttempt) {
origin: io.prestosql.cassandra/cassandra-driver

void startPeriodicReconnectionAttempt(final Host host, final boolean isHostAddition) {
  new AbstractReconnectionHandler(host.toString(), reconnectionExecutor, reconnectionPolicy().newSchedule(), host.reconnectionAttempt) {
origin: io.prestosql.cassandra/cassandra-driver

new AbstractReconnectionHandler(host.toString(), reconnectionExecutor, reconnectionPolicy().newSchedule(), host.reconnectionAttempt, 0) {
origin: com.yugabyte/cassandra-driver-core

new AbstractReconnectionHandler(host.toString(), reconnectionExecutor, reconnectionPolicy().newSchedule(), host.reconnectionAttempt, 0) {
origin: com.facebook.presto.cassandra/cassandra-driver

new AbstractReconnectionHandler(host.toString(), reconnectionExecutor, reconnectionPolicy().newSchedule(), host.reconnectionAttempt, 0) {
com.datastax.driver.coreHosttoString

Popular methods of Host

  • getAddress
    Returns the address that the driver will use to connect to the node. This is a shortcut for getSocke
  • getDatacenter
    Returns the name of the datacenter this host is part of. The returned datacenter name is the one as
  • getRack
    Returns the name of the rack this host is part of. The returned rack name is the one as known by Cas
  • getCassandraVersion
    The Cassandra version the host is running. It is also possible for this information to be unavailabl
  • isUp
    Returns whether the host is considered up by the driver. Please note that this is only the view of t
  • getSocketAddress
    Returns the address and port that the driver will use to connect to the node. This is the node's br
  • equals
  • <init>
  • getBroadcastAddress
    Returns the node broadcast address (that is, the IP by which it should be contacted by other peers i
  • setDown
  • setLocationInfo
  • setUp
  • setLocationInfo,
  • setUp,
  • wasJustAdded,
  • setDseGraphEnabled,
  • setDseVersion,
  • setDseWorkload,
  • setTokens,
  • setVersion,
  • getBroadcastSocketAddress

Popular in Java

  • Making http post requests using okhttp
  • runOnUiThread (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getExternalFilesDir (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • JFrame (javax.swing)
  • Sublime Text for Python
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now