Codota Logo
Cluster$Manager.protocolVersion
Code IndexAdd Codota to your IDE (free)

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

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

  • Common ways to obtain Cluster$Manager
private void myMethod () {
Cluster$Manager c =
  • Codota IconCluster cluster;String str;List list;Configuration configuration;new Manager(cluster, str, list, configuration)
  • Smart code suggestions by Codota
}
origin: com.datastax.cassandra/cassandra-driver-core

  new DefaultResultSetFuture(null, cluster.protocolVersion(), new Requests.Query(query));
c.write(future);
Row row = future.get().one();
origin: com.datastax.cassandra/cassandra-driver-core

if (protocolVersion().compareTo(ProtocolVersion.V4) < 0) {
 final SettableFuture<?> future = SettableFuture.create();
 scheduledTasksExecutor.schedule(
origin: com.datastax.cassandra/cassandra-driver-core

/**
 * Sets the default fetch size to use for SELECT queries.
 *
 * <p>The fetch size set through this method will be use for queries that don't explicitly have a
 * fetch size, i.e. when {@link Statement#getFetchSize} is less or equal to 0.
 *
 * @param fetchSize the new fetch size to set as default. It must be strictly positive but you can
 *     use {@code Integer.MAX_VALUE} to disable paging.
 * @return this {@code QueryOptions} instance.
 * @throws IllegalArgumentException if {@code fetchSize &lte; 0}.
 * @throws UnsupportedFeatureException if version 1 of the native protocol is in use and {@code
 *     fetchSize != Integer.MAX_VALUE} as paging is not supported by version 1 of the protocol.
 *     See {@link Cluster.Builder#withProtocolVersion} for more details on protocol versions.
 */
public QueryOptions setFetchSize(int fetchSize) {
 if (fetchSize <= 0)
  throw new IllegalArgumentException("Invalid fetchSize, should be > 0, got " + fetchSize);
 ProtocolVersion version = manager == null ? null : manager.protocolVersion();
 if (fetchSize != Integer.MAX_VALUE && version == ProtocolVersion.V1)
  throw new UnsupportedFeatureException(version, "Paging is not supported");
 this.fetchSize = fetchSize;
 return this;
}
origin: com.datastax.cassandra/cassandra-driver-core

 @Override
 public void run() {
  DefaultResultSetFuture actualFuture =
    new DefaultResultSetFuture(
      SessionManager.this,
      cluster.manager.protocolVersion(),
      makeRequestMessage(statement, null));
  execute(actualFuture, statement);
  chainedFuture.setSource(actualFuture);
 }
},
origin: com.datastax.cassandra/cassandra-driver-core

DefaultResultSetFuture future =
  new DefaultResultSetFuture(
    this, cluster.manager.protocolVersion(), makeRequestMessage(statement, null));
execute(future, statement);
return future;
origin: com.datastax.cassandra/cassandra-driver-core

DefaultResultSetFuture peersV2Future =
  new DefaultResultSetFuture(
    null, cluster.protocolVersion(), new Requests.Query(SELECT_PEERS_V2));
connection.write(peersV2Future);
final SettableFuture<ResultSet> peersFuture = SettableFuture.create();
DefaultResultSetFuture peersFuture =
  new DefaultResultSetFuture(
    null, cluster.protocolVersion(), new Requests.Query(SELECT_PEERS));
connection.write(peersFuture);
return peersFuture;
origin: com.datastax.cassandra/cassandra-driver-core

ProtocolVersion protocolVersion = cluster.manager.protocolVersion();
CodecRegistry codecRegistry = cluster.manager.configuration.getCodecRegistry();
origin: com.datastax.cassandra/cassandra-driver-core

configuration.getPoolingOptions().setProtocolVersion(protocolVersion());
origin: com.datastax.cassandra/cassandra-driver-core

cassandraVersion = cluster.protocolVersion().minCassandraVersion();
logger.warn(
  "Cannot find Cassandra version for host {} to parse the schema, using {} based on protocol version in use. "
origin: com.yugabyte/cassandra-driver-core

public void ensurePoolsSizing() {
  if (protocolVersion().compareTo(ProtocolVersion.V3) >= 0)
    return;
  for (SessionManager session : sessions) {
    for (HostConnectionPool pool : session.pools.values())
      pool.ensureCoreConnections();
  }
}
origin: com.facebook.presto.cassandra/cassandra-driver

public void ensurePoolsSizing() {
  if (protocolVersion().compareTo(ProtocolVersion.V3) >= 0)
    return;
  for (SessionManager session : sessions) {
    for (HostConnectionPool pool : session.pools.values())
      pool.ensureCoreConnections();
  }
}
origin: com.facebook.presto.cassandra/cassandra-driver

/**
 * Creates a tuple type given a list of types.
 *
 * @param types the types for the tuple type.
 * @return the newly created tuple type.
 */
public TupleType newTupleType(List<DataType> types) {
  return new TupleType(types, cluster.protocolVersion(), cluster.configuration.getCodecRegistry());
}
origin: com.yugabyte/cassandra-driver-core

/**
 * Creates a tuple type given a list of types.
 *
 * @param types the types for the tuple type.
 * @return the newly created tuple type.
 */
public TupleType newTupleType(List<DataType> types) {
  return new TupleType(types, cluster.protocolVersion(), cluster.configuration.getCodecRegistry());
}
origin: com.datastax.cassandra/cassandra-driver-core

private static boolean checkSchemaAgreement(Connection connection, Cluster.Manager cluster)
  throws InterruptedException, ExecutionException {
 DefaultResultSetFuture peersFuture =
   new DefaultResultSetFuture(
     null, cluster.protocolVersion(), new Requests.Query(SELECT_SCHEMA_PEERS));
 DefaultResultSetFuture localFuture =
   new DefaultResultSetFuture(
     null, cluster.protocolVersion(), new Requests.Query(SELECT_SCHEMA_LOCAL));
 connection.write(peersFuture);
 connection.write(localFuture);
 Set<UUID> versions = new HashSet<UUID>();
 Row localRow = localFuture.get().one();
 if (localRow != null && !localRow.isNull("schema_version"))
  versions.add(localRow.getUUID("schema_version"));
 for (Row row : peersFuture.get()) {
  InetSocketAddress addr = nativeAddressForPeerHost(row, connection.address, cluster);
  if (addr == null || row.isNull("schema_version")) continue;
  Host peer = cluster.metadata.getHost(addr);
  if (peer != null && peer.isUp()) versions.add(row.getUUID("schema_version"));
 }
 logger.debug("Checking for schema agreement: versions are {}", versions);
 return versions.size() <= 1;
}
origin: com.facebook.presto.cassandra/cassandra-driver

  @Override
  public void run() {
    DefaultResultSetFuture actualFuture = new DefaultResultSetFuture(SessionManager.this, cluster.manager.protocolVersion(), makeRequestMessage(statement, null));
    execute(actualFuture, statement);
    chainedFuture.setSource(actualFuture);
  }
}, executor());
origin: com.datastax.cassandra/cassandra-driver-core

public void ensurePoolsSizing() {
 if (protocolVersion().compareTo(ProtocolVersion.V3) >= 0) return;
 for (SessionManager session : sessions) {
  for (HostConnectionPool pool : session.pools.values()) pool.ensureCoreConnections();
 }
}
origin: io.prestosql.cassandra/cassandra-driver

  @Override
  public void run() {
    DefaultResultSetFuture actualFuture = new DefaultResultSetFuture(SessionManager.this, cluster.manager.protocolVersion(), makeRequestMessage(statement, null));
    execute(actualFuture, statement);
    chainedFuture.setSource(actualFuture);
  }
}, executor());
origin: com.datastax.cassandra/cassandra-driver-core

/**
 * Creates a tuple type given a list of types.
 *
 * @param types the types for the tuple type.
 * @return the newly created tuple type.
 */
public TupleType newTupleType(List<DataType> types) {
 return new TupleType(
   types, cluster.protocolVersion(), cluster.configuration.getCodecRegistry());
}
origin: io.prestosql.cassandra/cassandra-driver

public void ensurePoolsSizing() {
  if (protocolVersion().compareTo(ProtocolVersion.V3) >= 0)
    return;
  for (SessionManager session : sessions) {
    for (HostConnectionPool pool : session.pools.values())
      pool.ensureCoreConnections();
  }
}
origin: com.datastax.cassandra/cassandra-driver-core

    null, cluster.protocolVersion(), new Requests.Query(SELECT_LOCAL));
ListenableFuture<ResultSet> peersFuture = selectPeersFuture(connection);
connection.write(localFuture);
com.datastax.driver.coreCluster$ManagerprotocolVersion

Popular methods of Cluster$Manager

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

Popular in Java

  • Reactive rest calls using spring rest template
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • onCreateOptionsMenu (Activity)
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • TreeSet (java.util)
    A NavigableSet implementation based on a TreeMap. The elements are ordered using their Comparable, o
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • IsNull (org.hamcrest.core)
    Is the value null?
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now