public ThriftClientState(InetSocketAddress remoteAddress) { super(remoteAddress); this.queryState = new QueryState(this); }
public ThriftClientState(SocketAddress remoteAddress) { super(remoteAddress); this.queryState = new QueryState(this); }
public ThriftClientState(InetSocketAddress remoteAddress) { super(remoteAddress); this.queryState = new QueryState(this); }
private QueryState getQueryState(int streamId) { QueryState qState = queryStates.get(streamId); if (qState == null) { // In theory we shouldn't get any race here, but it never hurts to be careful QueryState newState = new QueryState(clientState); if ((qState = queryStates.putIfAbsent(streamId, newState)) == null) qState = newState; } return qState; }
private QueryState getQueryState(int streamId) { QueryState qState = queryStates.get(streamId); if (qState == null) { // In theory we shouldn't get any race here, but it never hurts to be careful QueryState newState = new QueryState(clientState); if ((qState = queryStates.putIfAbsent(streamId, newState)) == null) qState = newState; } return qState; }
private QueryState getQueryState(int streamId) { QueryState qState = queryStates.get(streamId); if (qState == null) { // In theory we shouldn't get any race here, but it never hurts to be careful QueryState newState = new QueryState(clientState); if ((qState = queryStates.putIfAbsent(streamId, newState)) == null) qState = newState; } return qState; }
private QueryState getQueryState(int streamId) { QueryState qState = queryStates.get(streamId); if (qState == null) { // In theory we shouldn't get any race here, but it never hurts to be careful QueryState newState = new QueryState(clientState); if ((qState = queryStates.putIfAbsent(streamId, newState)) == null) qState = newState; } return qState; }
/** * @return a QueryState object for internal C* calls (not limited by any kind of auth). */ public static QueryState forInternalCalls() { return new QueryState(ClientState.forInternalCalls()); }
/** * @return a QueryState object for internal C* calls (not limited by any kind of auth). */ public static QueryState forInternalCalls() { return new QueryState(ClientState.forInternalCalls()); }
/** * @return a QueryState object for internal C* calls (not limited by any kind of auth). */ public static QueryState forInternalCalls() { return new QueryState(ClientState.forInternalCalls()); }
/** * @return a QueryState object for internal C* calls (not limited by any kind of auth). */ public static QueryState forInternalCalls() { return new QueryState(ClientState.forInternalCalls()); }
InternalStateInstance() { ClientState state = ClientState.forInternalCalls(); try { state.setKeyspace(Keyspace.SYSTEM_KS); } catch (InvalidRequestException e) { throw new RuntimeException(); } this.queryState = new QueryState(state); } }
InternalStateInstance() { ClientState state = ClientState.forInternalCalls(); state.setKeyspace(SchemaConstants.SYSTEM_KEYSPACE_NAME); this.queryState = new QueryState(state); } }
InternalStateInstance() { ClientState state = ClientState.forInternalCalls(); state.setKeyspace(SchemaConstants.SYSTEM_KEYSPACE_NAME); this.queryState = new QueryState(state); } }
InternalStateInstance() { ClientState state = ClientState.forInternalCalls(); state.setKeyspace(SchemaConstants.SYSTEM_KEYSPACE_NAME); this.queryState = new QueryState(state); } }
public UntypedResultSet process(final ConsistencyLevel cl, final ConsistencyLevel serialConsistencyLevel, ClientState clientState, final String query, Long writetime, final Object... values) throws RequestExecutionException, RequestValidationException, InvalidRequestException { if (logger.isDebugEnabled()) logger.debug("processing CL={} SERIAL_CL={} query={}", cl, serialConsistencyLevel, query); ParsedStatement.Prepared prepared = QueryProcessor.getStatement(query, clientState); List<ByteBuffer> boundValues = new ArrayList<ByteBuffer>(values.length); for (int i = 0; i < values.length; i++) { Object v = values[i]; AbstractType type = prepared.boundNames.get(i).type; boundValues.add(v instanceof ByteBuffer || v == null ? (ByteBuffer) v : type.decompose(v)); } QueryState queryState = new QueryState(clientState); QueryOptions queryOptions = QueryOptions.forInternalCalls(cl, serialConsistencyLevel, boundValues); ResultMessage result = QueryProcessor.instance.process(query, queryState, queryOptions, System.nanoTime()); writetime = queryState.getTimestamp(); if (result instanceof ResultMessage.Rows) return UntypedResultSet.create(((ResultMessage.Rows) result).result); else return null; }
ResultMessage result = cqlStatement.statement.executeInternal(new QueryState(ClientState.forInternalCalls()), QueryOptions.forInternalCalls(ConsistencyLevel.ONE, docPk.serialize(cqlStatement))); if (result instanceof ResultMessage.Rows) { UntypedResultSet rs = UntypedResultSet.create(((ResultMessage.Rows)result).result);