Пример #1
0
 private static ExecutionInfo update(
     ExecutionInfo info, Responses.Result msg, SessionManager session) {
   UUID tracingId = msg.getTracingId();
   return tracingId == null || info == null
       ? info
       : info.withTrace(new QueryTrace(tracingId, session));
 }
Пример #2
0
    private MultiPage(
        ColumnDefinitions metadata,
        Token.Factory tokenFactory,
        ProtocolVersion protocolVersion,
        Queue<List<ByteBuffer>> rows,
        ExecutionInfo info,
        ByteBuffer pagingState,
        SessionManager session,
        Statement statement) {

      // Note: as of Cassandra 2.1.0, it turns out that the result of a CAS update is never paged,
      // so
      // we could hard-code the result of wasApplied in this class to "true". However, we can not be
      // sure
      // that this will never change, so apply the generic check by peeking at the first row.
      super(metadata, tokenFactory, rows.peek(), protocolVersion);
      this.currentPage = rows;
      this.infos.offer(info.withPagingState(pagingState, protocolVersion).withStatement(statement));

      this.fetchState = new FetchingState(pagingState, null);
      this.session = session;
      this.statement = statement;
    }