@Override public PreparedStatement setRoutingKey(ByteBuffer... routingKeyComponents) { this.routingKey = SimpleStatement.compose(routingKeyComponents); return this; }
/** * Sets the routing key for this query. * * <p>See {@link #setRoutingKey(ByteBuffer)} for more information. This method is a variant for * when the query partition key is composite and thus the routing key must be built from multiple * values. * * @param routingKeyComponents the raw (binary) values to compose to obtain the routing key. * @return this {@code SimpleStatement} object. * @see Statement#getRoutingKey */ public SimpleStatement setRoutingKey(ByteBuffer... routingKeyComponents) { this.routingKey = compose(routingKeyComponents); return this; }
/** * Sets the routing key for this bound statement, when the query partition key is composite and * the routing key must be built from multiple values. * * <p>This is useful when the routing key can neither be set on the {@code PreparedStatement} this * bound statement was built from, nor automatically computed from bound variables. In particular, * this is the case if the partition key is composite and only some of its components are bound. * * @param routingKeyComponents the raw (binary) values to compose to obtain the routing key. * @return this {@code BoundStatement} object. * @see BoundStatement#getRoutingKey */ public BoundStatement setRoutingKey(ByteBuffer... routingKeyComponents) { this.routingKey = SimpleStatement.compose(routingKeyComponents); return this; }
/** * Builds a new {@link Token} from a partition key. * * @param components the components of the partition key, in their serialized form (obtained with * {@link TypeCodec#serialize(Object, ProtocolVersion)}). * @return the token. * @throws IllegalStateException if the token factory was not initialized. This would typically * happen if metadata was explicitly disabled with {@link * QueryOptions#setMetadataEnabled(boolean)} before startup. */ public Token newToken(ByteBuffer... components) { TokenMap current = tokenMap; if (current == null) throw new IllegalStateException( "Token factory not set. This should only happen if metadata was explicitly disabled"); return current.factory.hash(SimpleStatement.compose(components)); }
components[i] = value; return SimpleStatement.compose(components);
@Override public PreparedStatement setRoutingKey(ByteBuffer... routingKeyComponents) { this.routingKey = SimpleStatement.compose(routingKeyComponents); return this; }
@Override public PreparedStatement setRoutingKey(ByteBuffer... routingKeyComponents) { this.routingKey = SimpleStatement.compose(routingKeyComponents); return this; }
@Override public PreparedStatement setRoutingKey(ByteBuffer... routingKeyComponents) { this.routingKey = SimpleStatement.compose(routingKeyComponents); return this; }
public PreparedStatement setRoutingKey(ByteBuffer... routingKeyComponents) { this.routingKey = SimpleStatement.compose(routingKeyComponents); return this; }
/** * Sets the routing key for this query. * <p/> * See {@link #setRoutingKey(ByteBuffer)} for more information. This * method is a variant for when the query partition key is composite and * thus the routing key must be built from multiple values. * * @param routingKeyComponents the raw (binary) values to compose to obtain * the routing key. * @return this {@code SimpleStatement} object. * @see Statement#getRoutingKey */ public SimpleStatement setRoutingKey(ByteBuffer... routingKeyComponents) { this.routingKey = compose(routingKeyComponents); return this; }
/** * Sets the routing key for this query. * <p/> * See {@link #setRoutingKey(ByteBuffer)} for more information. This * method is a variant for when the query partition key is composite and * thus the routing key must be built from multiple values. * * @param routingKeyComponents the raw (binary) values to compose to obtain * the routing key. * @return this {@code SimpleStatement} object. * @see Statement#getRoutingKey */ public SimpleStatement setRoutingKey(ByteBuffer... routingKeyComponents) { this.routingKey = compose(routingKeyComponents); return this; }
/** * Sets the routing key for this query. * <p/> * See {@link #setRoutingKey(ByteBuffer)} for more information. This * method is a variant for when the query partition key is composite and * thus the routing key must be built from multiple values. * * @param routingKeyComponents the raw (binary) values to compose to obtain * the routing key. * @return this {@code SimpleStatement} object. * @see Statement#getRoutingKey */ public SimpleStatement setRoutingKey(ByteBuffer... routingKeyComponents) { this.routingKey = compose(routingKeyComponents); return this; }
/** * Sets the routing key for this bound statement, when the query partition key is composite and the routing key must * be built from multiple values. * <p/> * This is useful when the routing key can neither be set on the {@code PreparedStatement} this bound statement * was built from, nor automatically computed from bound variables. In particular, this is the case if the * partition key is composite and only some of its components are bound. * * @param routingKeyComponents the raw (binary) values to compose to obtain * the routing key. * @return this {@code BoundStatement} object. * @see BoundStatement#getRoutingKey */ public BoundStatement setRoutingKey(ByteBuffer... routingKeyComponents) { this.routingKey = SimpleStatement.compose(routingKeyComponents); return this; }
/** * Sets the routing key for this bound statement, when the query partition key is composite and the routing key must * be built from multiple values. * <p/> * This is useful when the routing key can neither be set on the {@code PreparedStatement} this bound statement * was built from, nor automatically computed from bound variables. In particular, this is the case if the * partition key is composite and only some of its components are bound. * * @param routingKeyComponents the raw (binary) values to compose to obtain * the routing key. * @return this {@code BoundStatement} object. * @see BoundStatement#getRoutingKey */ public BoundStatement setRoutingKey(ByteBuffer... routingKeyComponents) { this.routingKey = SimpleStatement.compose(routingKeyComponents); return this; }
/** * Sets the routing key for this bound statement, when the query partition key is composite and the routing key must * be built from multiple values. * <p/> * This is useful when the routing key can neither be set on the {@code PreparedStatement} this bound statement * was built from, nor automatically computed from bound variables. In particular, this is the case if the * partition key is composite and only some of its components are bound. * * @param routingKeyComponents the raw (binary) values to compose to obtain * the routing key. * @return this {@code BoundStatement} object. * @see BoundStatement#getRoutingKey */ public BoundStatement setRoutingKey(ByteBuffer... routingKeyComponents) { this.routingKey = SimpleStatement.compose(routingKeyComponents); return this; }
/** * Sets the routing key for this query. * <p> * See {@link #setRoutingKey(ByteBuffer)} for more information. This * method is a variant for when the query partition key is composite and * thus the routing key must be built from multiple values. * * @param routingKeyComponents the raw (binary) values to compose to obtain * the routing key. * @return this {@code SimpleStatement} object. * * @see Statement#getRoutingKey */ public SimpleStatement setRoutingKey(ByteBuffer... routingKeyComponents) { this.routingKey = compose(routingKeyComponents); return this; }
/** * Builds a new {@link Token} from a partition key. * * @param components the components of the partition key, in their serialized form (obtained with * {@link TypeCodec#serialize(Object, ProtocolVersion)}). * @return the token. * @throws IllegalStateException if the token factory was not initialized. This would typically * happen if metadata was explicitly disabled with {@link QueryOptions#setMetadataEnabled(boolean)} * before startup. */ public Token newToken(ByteBuffer... components) { TokenMap current = tokenMap; if (current == null) throw new IllegalStateException("Token factory not set. This should only happen if metadata was explicitly disabled"); return current.factory.hash( SimpleStatement.compose(components)); }
/** * Builds a new {@link Token} from a partition key. * * @param components the components of the partition key, in their serialized form (obtained with * {@link TypeCodec#serialize(Object, ProtocolVersion)}). * @return the token. * @throws IllegalStateException if the token factory was not initialized. This would typically * happen if metadata was explicitly disabled with {@link QueryOptions#setMetadataEnabled(boolean)} * before startup. */ public Token newToken(ByteBuffer... components) { TokenMap current = tokenMap; if (current == null) throw new IllegalStateException("Token factory not set. This should only happen if metadata was explicitly disabled"); return current.factory.hash( SimpleStatement.compose(components)); }
/** * Builds a new {@link Token} from a partition key. * * @param components the components of the partition key, in their serialized form (obtained with * {@link TypeCodec#serialize(Object, ProtocolVersion)}). * @return the token. * @throws IllegalStateException if the token factory was not initialized. This would typically * happen if metadata was explicitly disabled with {@link QueryOptions#setMetadataEnabled(boolean)} * before startup. */ public Token newToken(ByteBuffer... components) { TokenMap current = tokenMap; if (current == null) throw new IllegalStateException("Token factory not set. This should only happen if metadata was explicitly disabled"); return current.factory.hash( SimpleStatement.compose(components)); }
components[i] = value; return SimpleStatement.compose(components);