Tabnine Logo
Cluster$Manager
Code IndexAdd Tabnine to your IDE (free)

How to use
Cluster$Manager
in
com.datastax.driver.core

Best Java code snippets using com.datastax.driver.core.Cluster$Manager (Showing top 20 results out of 315)

origin: com.datastax.cassandra/cassandra-driver-core

 negotiateProtocolVersionAndConnect();
 loadBalancingPolicy().init(Cluster.this, contactPointHosts);
 speculativeExecutionPolicy().init(Cluster.this);
 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);
 for (Host host : removedContactPointHosts) {
  loadBalancingPolicy().onRemove(host);
  for (Host.StateListener listener : listeners) listener.onRemove(host);
  loadBalancingPolicy().onDown(host);
  for (Host.StateListener listener : listeners) listener.onDown(host);
  startPeriodicReconnectionAttempt(host, true);
 configuration.getPoolingOptions().setProtocolVersion(protocolVersion());
   logUnsupportedVersionProtocol(host, connectionFactory.protocolVersion);
   continue;
  if (!contactPointHosts.contains(host)) loadBalancingPolicy().onAdd(host);
} catch (RuntimeException e) {
 initException = e;
 close();
 throw e;
origin: com.datastax.cassandra/cassandra-driver-core

case TOPOLOGY_CHANGE:
 ProtocolEvent.TopologyChange tpc = (ProtocolEvent.TopologyChange) event;
 InetSocketAddress tpAddr = translateAddress(tpc.node.getAddress());
 Host.statesLogger.debug("[{}] received event {}", tpAddr, tpc.change);
 switch (tpc.change) {
  case NEW_NODE:
   submitNodeRefresh(tpAddr, HostEvent.ADDED);
   break;
  case REMOVED_NODE:
   submitNodeRefresh(tpAddr, HostEvent.REMOVED);
   break;
  case MOVED_NODE:
   submitNodeListRefresh();
   break;
case STATUS_CHANGE:
 ProtocolEvent.StatusChange stc = (ProtocolEvent.StatusChange) event;
 InetSocketAddress stAddr = translateAddress(stc.node.getAddress());
 Host.statesLogger.debug("[{}] received event {}", stAddr, stc.status);
 switch (stc.status) {
  case UP:
   submitNodeRefresh(stAddr, HostEvent.UP);
   break;
  case DOWN:
   submitNodeRefresh(stAddr, HostEvent.DOWN);
   break;
  case CREATED:
  case UPDATED:
origin: com.datastax.cassandra/cassandra-driver-core

 @Override
 public void onFailure(Throwable t) {
  if (t instanceof UnsupportedProtocolVersionException) {
   cluster.manager.logUnsupportedVersionProtocol(
     host, ((UnsupportedProtocolVersionException) t).getUnsupportedVersion());
   cluster.manager.triggerOnDown(host, false);
  } else if (t instanceof ClusterNameMismatchException) {
   ClusterNameMismatchException e = (ClusterNameMismatchException) t;
   cluster.manager.logClusterNameMismatch(
     host, e.expectedClusterName, e.actualClusterName);
   cluster.manager.triggerOnDown(host, false);
  } else {
   logger.warn("Error creating pool to " + host, t);
   // do not mark the host down, as there could be other connections to it
   // (e.g. the control connection, or another session pool).
   // The conviction policy will mark it down if it has no more active connections.
  }
  // propagate errors; for all other exceptions, consider the pool init failed
  // but allow the session init process to continue normally
  if (t instanceof Error) future.setException(t);
  else future.set(false);
 }
});
origin: io.prestosql.cassandra/cassandra-driver

loadBalancingPolicy().init(Cluster.this, contactPointHosts);
speculativeExecutionPolicy().init(Cluster.this);
configuration.getPolicies().getRetryPolicy().init(Cluster.this);
reconnectionPolicy().init(Cluster.this);
configuration.getPolicies().getAddressTranslator().init(Cluster.this);
for (LatencyTracker tracker : latencyTrackers)
  listener.onRegister(Cluster.this);
for (Host host : removedContactPointHosts) {
  loadBalancingPolicy().onRemove(host);
  for (Host.StateListener listener : listeners)
    listener.onRemove(host);
  loadBalancingPolicy().onDown(host);
  for (Host.StateListener listener : listeners)
    listener.onDown(host);
  startPeriodicReconnectionAttempt(host, true);
configuration.getPoolingOptions().setProtocolVersion(protocolVersion());
    logUnsupportedVersionProtocol(host, connectionFactory.protocolVersion);
    continue;
    loadBalancingPolicy().onAdd(host);
close();
throw e;
origin: com.facebook.presto.cassandra/cassandra-driver

loadBalancingPolicy().init(Cluster.this, contactPointHosts);
speculativeExecutionPolicy().init(Cluster.this);
configuration.getPolicies().getRetryPolicy().init(Cluster.this);
reconnectionPolicy().init(Cluster.this);
configuration.getPolicies().getAddressTranslator().init(Cluster.this);
for (LatencyTracker tracker : latencyTrackers)
  listener.onRegister(Cluster.this);
for (Host host : removedContactPointHosts) {
  loadBalancingPolicy().onRemove(host);
  for (Host.StateListener listener : listeners)
    listener.onRemove(host);
  loadBalancingPolicy().onDown(host);
  for (Host.StateListener listener : listeners)
    listener.onDown(host);
  startPeriodicReconnectionAttempt(host, true);
configuration.getPoolingOptions().setProtocolVersion(protocolVersion());
    logUnsupportedVersionProtocol(host, connectionFactory.protocolVersion);
    continue;
    loadBalancingPolicy().onAdd(host);
close();
throw e;
origin: com.yugabyte/cassandra-driver-core

case TOPOLOGY_CHANGE:
  ProtocolEvent.TopologyChange tpc = (ProtocolEvent.TopologyChange) event;
  InetSocketAddress tpAddr = translateAddress(tpc.node.getAddress());
  Host.statesLogger.debug("[{}] received event {}", tpAddr, tpc.change);
  switch (tpc.change) {
    case NEW_NODE:
      submitNodeRefresh(tpAddr, HostEvent.ADDED);
      break;
    case REMOVED_NODE:
      submitNodeRefresh(tpAddr, HostEvent.REMOVED);
      break;
    case MOVED_NODE:
      submitNodeListRefresh();
      break;
case STATUS_CHANGE:
  ProtocolEvent.StatusChange stc = (ProtocolEvent.StatusChange) event;
  InetSocketAddress stAddr = translateAddress(stc.node.getAddress());
  Host.statesLogger.debug("[{}] received event {}", stAddr, stc.status);
  switch (stc.status) {
    case UP:
      submitNodeRefresh(stAddr, HostEvent.UP);
      break;
    case DOWN:
      submitNodeRefresh(stAddr, HostEvent.DOWN);
      break;
    case CREATED:
    case UPDATED:
origin: com.yugabyte/cassandra-driver-core

negotiateProtocolVersionAndConnect();
loadBalancingPolicy().init(Cluster.this, contactPointHosts);
speculativeExecutionPolicy().init(Cluster.this);
configuration.getPolicies().getRetryPolicy().init(Cluster.this);
reconnectionPolicy().init(Cluster.this);
configuration.getPolicies().getAddressTranslator().init(Cluster.this);
for (LatencyTracker tracker : latencyTrackers)
  listener.onRegister(Cluster.this);
for (Host host : removedContactPointHosts) {
  loadBalancingPolicy().onRemove(host);
  for (Host.StateListener listener : listeners)
    listener.onRemove(host);
  loadBalancingPolicy().onDown(host);
  for (Host.StateListener listener : listeners)
    listener.onDown(host);
  startPeriodicReconnectionAttempt(host, true);
configuration.getPoolingOptions().setProtocolVersion(protocolVersion());
    logUnsupportedVersionProtocol(host, connectionFactory.protocolVersion);
    continue;
    loadBalancingPolicy().onAdd(host);
close();
origin: com.stratio.cassandra/cassandra-driver-core

case TOPOLOGY_CHANGE:
  ProtocolEvent.TopologyChange tpc = (ProtocolEvent.TopologyChange)event;
  InetSocketAddress tpAddr = translateAddress(tpc.node.getAddress());
  switch (tpc.change) {
    case NEW_NODE:
      removeHost(metadata.getHost(tpAddr));
      break;
    case MOVED_NODE:
case STATUS_CHANGE:
  ProtocolEvent.StatusChange stc = (ProtocolEvent.StatusChange)event;
  InetSocketAddress stAddr = translateAddress(stc.node.getAddress());
  switch (stc.status) {
    case UP:
        triggerOnDown(hostDown);
      break;
    case CREATED:
      if (scc.table.isEmpty())
        submitSchemaRefresh(null, null);
      else
        submitSchemaRefresh(scc.keyspace, null);
      break;
    case DROPPED:
      if (scc.table.isEmpty())
        submitSchemaRefresh(null, null);
      else
origin: com.facebook.presto.cassandra/cassandra-driver

case TOPOLOGY_CHANGE:
  ProtocolEvent.TopologyChange tpc = (ProtocolEvent.TopologyChange) event;
  InetSocketAddress tpAddr = translateAddress(tpc.node.getAddress());
  Host.statesLogger.debug("[{}] received event {}", tpAddr, tpc.change);
  switch (tpc.change) {
    case NEW_NODE:
      submitNodeRefresh(tpAddr, HostEvent.ADDED);
      break;
    case REMOVED_NODE:
      submitNodeRefresh(tpAddr, HostEvent.REMOVED);
      break;
    case MOVED_NODE:
      submitNodeListRefresh();
      break;
case STATUS_CHANGE:
  ProtocolEvent.StatusChange stc = (ProtocolEvent.StatusChange) event;
  InetSocketAddress stAddr = translateAddress(stc.node.getAddress());
  Host.statesLogger.debug("[{}] received event {}", stAddr, stc.status);
  switch (stc.status) {
    case UP:
      submitNodeRefresh(stAddr, HostEvent.UP);
      break;
    case DOWN:
      submitNodeRefresh(stAddr, HostEvent.DOWN);
      break;
    case CREATED:
    case UPDATED:
origin: io.prestosql.cassandra/cassandra-driver

  logger.info(String.format("Asked to rebuild %s %s.%s but I don't know keyspace %s",
      targetType, targetKeyspace, targetName, targetKeyspace));
  metadata.cluster.submitSchemaRefresh(null, null, null, null);
} else {
  switch (targetType) {
origin: com.yugabyte/cassandra-driver-core

  logger.info(String.format("Asked to rebuild %s %s.%s but I don't know keyspace %s",
      targetType, targetKeyspace, targetName, targetKeyspace));
  metadata.cluster.submitSchemaRefresh(null, null, null, null);
} else {
  switch (targetType) {
origin: com.stratio.cassandra/cassandra-driver-core

cluster.submitSchemaRefresh(null, null);
return;
origin: com.facebook.presto.cassandra/cassandra-driver

  logger.info(String.format("Asked to rebuild %s %s.%s but I don't know keyspace %s",
      targetType, targetKeyspace, targetName, targetKeyspace));
  metadata.cluster.submitSchemaRefresh(null, null, null, null);
} else {
  switch (targetType) {
origin: com.stratio.cassandra/cassandra-driver-core

synchronized void init() {
  if (isClosed())
    throw new IllegalStateException("Can't use this Cluster instance because it was previously closed");
  if (isInit)
  loadBalancingPolicy().init(Cluster.this, metadata.allHosts());
    close();
    throw e;
origin: com.stratio.cassandra/cassandra-driver-core

this.manager.init();
return this;
origin: com.datastax.dse/dse-java-driver-core

cluster.manager.triggerOnDown(pool.host, true);
origin: io.prestosql.cassandra/cassandra-driver

schemaReady = submitSchemaRefresh(targetType, targetKeyspace, targetName, targetSignature);
origin: com.yugabyte/cassandra-driver-core

this.manager.init();
return this;
origin: com.facebook.presto.cassandra/cassandra-driver

schemaReady = submitSchemaRefresh(targetType, targetKeyspace, targetName, targetSignature);
origin: io.prestosql.cassandra/cassandra-driver

this.manager.init();
return this;
com.datastax.driver.coreCluster$Manager

Javadoc

The sessions and hosts managed by this a Cluster instance.

Note: the reason we create a Manager object separate from Cluster is that Manager is not publicly visible. For instance, we wouldn't want user to be able to call the #onUp and #onDown methods.

Most used methods

  • loadBalancingPolicy
  • submitSchemaRefresh
  • triggerOnDown
  • isClosed
  • submitNodeListRefresh
  • <init>
  • addPrepared
  • close
  • ensurePoolsSizing
  • init
  • logUnsupportedVersionProtocol
  • prepareAllQueries
  • logUnsupportedVersionProtocol,
  • prepareAllQueries,
  • protocolVersion,
  • reconnectionPolicy,
  • refreshConnectedHosts,
  • refreshSchemaAndSignal,
  • removeHost,
  • translateAddress,
  • triggerOnAdd,
  • triggerOnRemove

Popular in Java

  • Making http post requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • getContentResolver (Context)
  • getSharedPreferences (Context)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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