/** * add a string to buffer * @param value * @return */ public FieldBufferBuilder addString( final String value ) { buffer.add( STRING_SERIALIZER.toByteBuffer( value ) ); return this; }
@Override public PreparedIndexExpression<K, C> value(String value) { this.value = StringSerializer.get().toByteBuffer(value); return this; }
@Override public CqlStatement withCql(String cql) { query = StringSerializer.get().toByteBuffer(cql); return this; }
public Collection<ByteBuffer> build() { List<ByteBuffer> shards = Lists.newArrayListWithExpectedSize(shardCount); for (int i = 0; i < shardCount; i++) { shards.add(StringSerializer.get().toByteBuffer(prefix + i)); } return shards; } }
@Override public CqlStatement withCql(String cql) { query = StringSerializer.get().toByteBuffer(cql); return this; }
@Override public CqlStatement withCql(String cql) { query = StringSerializer.get().toByteBuffer(cql); return this; }
public Collection<ByteBuffer> build() { List<ByteBuffer> shards = Lists.newArrayListWithExpectedSize(shardCount); for (int i = 0; i < shardCount; i++) { shards.add(StringSerializer.get().toByteBuffer(prefix + i)); } return shards; } }
public RangeBuilder setStart(String value) { start = StringSerializer.get().toByteBuffer(value); return this; }
public RangeBuilder setEnd(String value) { end = StringSerializer.get().toByteBuffer(value); return this; }
@Override public CqlStatement withCql(String cql) { query = StringSerializer.get().toByteBuffer(cql); return this; }
@Override protected org.apache.cassandra.thrift.CqlResult execute_cql_query(Client client) throws InvalidRequestException, UnavailableException, TimedOutException, SchemaDisagreementException, TException { return client.execute_cql_query( StringSerializer.get().toByteBuffer(cql), useCompression ? Compression.GZIP : Compression.NONE); } }
@Override protected org.apache.cassandra.thrift.CqlResult execute_cql_query(Client client) throws InvalidRequestException, UnavailableException, TimedOutException, SchemaDisagreementException, TException { return client.execute_cql_query( StringSerializer.get().toByteBuffer(cql), useCompression ? Compression.GZIP : Compression.NONE); } }
@Override public Execution<Void> putValue(String value, Integer ttl) { return insertValue(StringSerializer.get().toByteBuffer(value), ttl); }
@Override protected org.apache.cassandra.thrift.CqlPreparedResult prepare_cql_query(Client client) throws InvalidRequestException, TException { return client.prepare_cql_query(StringSerializer.get().toByteBuffer(cql), Compression.NONE); }
@Override public Execution<Void> putValue(String value, Integer ttl) { return insertValue(StringSerializer.get().toByteBuffer(value), ttl); }
@Override protected org.apache.cassandra.thrift.CqlPreparedResult prepare_cql_query(Client client) throws InvalidRequestException, TException { return client.prepare_cql_query(StringSerializer.get().toByteBuffer(cql), Compression.NONE); }
@Override protected org.apache.cassandra.thrift.CqlPreparedResult prepare_cql_query(Client client) throws InvalidRequestException, TException { return client.prepare_cql3_query(StringSerializer.get().toByteBuffer(cql), Compression.NONE); }
@Override protected org.apache.cassandra.thrift.CqlPreparedResult prepare_cql_query(Client client) throws InvalidRequestException, TException { return client.prepare_cql3_query(StringSerializer.get().toByteBuffer(cql), Compression.NONE); }
@Override protected org.apache.cassandra.thrift.CqlResult execute_cql_query(Client client) throws InvalidRequestException, UnavailableException, TimedOutException, SchemaDisagreementException, TException { return client.execute_cql3_query( StringSerializer.get().toByteBuffer(cql), useCompression ? Compression.GZIP : Compression.NONE, ThriftConverter.ToThriftConsistencyLevel(cl)); }
@Override protected org.apache.cassandra.thrift.CqlResult execute_cql_query(Client client) throws InvalidRequestException, UnavailableException, TimedOutException, SchemaDisagreementException, TException { return client.execute_cql3_query( StringSerializer.get().toByteBuffer(cql), useCompression ? Compression.GZIP : Compression.NONE, ThriftConverter.ToThriftConsistencyLevel(cl)); }