@Override public ListenableFuture<List<CursorWithError>> apply( Vtgate.ExecuteBatchResponse response) throws Exception { Proto.checkError(response.getError()); return Futures.immediateFuture( Proto.fromQueryResponsesToCursorList(response.getResultsList())); } },
@Override public ListenableFuture<Cursor> apply(ExecuteKeyspaceIdsResponse response) throws Exception { Proto.checkError(response.getError()); return Futures.<Cursor>immediateFuture(new SimpleCursor(response.getResult())); } },
@Override public ListenableFuture<Cursor> apply(ExecuteKeyRangesResponse response) throws Exception { Proto.checkError(response.getError()); return Futures.<Cursor>immediateFuture(new SimpleCursor(response.getResult())); } },
@Override public ListenableFuture<Cursor> apply(ExecuteShardsResponse response) throws Exception { Proto.checkError(response.getError()); return Futures.<Cursor>immediateFuture(new SimpleCursor(response.getResult())); } },
@Override public ListenableFuture<Cursor> apply(ExecuteEntityIdsResponse response) throws Exception { Proto.checkError(response.getError()); return Futures.<Cursor>immediateFuture(new SimpleCursor(response.getResult())); } },
@Override public ListenableFuture<Cursor> apply(ExecuteResponse response) throws Exception { Proto.checkError(response.getError()); return Futures.<Cursor>immediateFuture(new SimpleCursor(response.getResult())); } },
@Override public ListenableFuture<List<Cursor>> apply(ExecuteBatchShardsResponse response) throws Exception { Proto.checkError(response.getError()); return Futures.<List<Cursor>>immediateFuture( Proto.toCursorList(response.getResultsList())); } },
@Override public ListenableFuture<List<Cursor>> apply(ExecuteBatchKeyspaceIdsResponse response) throws Exception { Proto.checkError(response.getError()); return Futures.<List<Cursor>>immediateFuture( Proto.toCursorList(response.getResultsList())); } },
@Override public ListenableFuture<Cursor> apply(ExecuteKeyRangesResponse response) throws Exception { setSession(response.getSession()); Proto.checkError(response.getError()); return Futures.<Cursor>immediateFuture(new SimpleCursor(response.getResult())); } },
@Override public ListenableFuture<List<CursorWithError>> apply( Vtgate.ExecuteBatchResponse response) throws Exception { setSession(response.getSession()); Proto.checkError(response.getError()); return Futures.immediateFuture( Proto.fromQueryResponsesToCursorList(response.getResultsList())); } },
@Override public ListenableFuture<List<Cursor>> apply( ExecuteBatchKeyspaceIdsResponse response) throws Exception { setSession(response.getSession()); Proto.checkError(response.getError()); return Futures.<List<Cursor>>immediateFuture( Proto.toCursorList(response.getResultsList())); } },
@Override public ListenableFuture<Cursor> apply(ExecuteEntityIdsResponse response) throws Exception { setSession(response.getSession()); Proto.checkError(response.getError()); return Futures.<Cursor>immediateFuture(new SimpleCursor(response.getResult())); } },
@Override public ListenableFuture<Cursor> apply(ExecuteResponse response) throws Exception { vtSession.setSession(response.getSession()); Proto.checkError(response.getError()); return Futures.<Cursor>immediateFuture(new SimpleCursor(response.getResult())); } }, directExecutor()));
@Override public ListenableFuture<Cursor> apply(ExecuteResponse response) throws Exception { setSession(response.getSession()); Proto.checkError(response.getError()); return Futures.<Cursor>immediateFuture(new SimpleCursor(response.getResult())); } },
@Override public ListenableFuture<Cursor> apply(ExecuteKeyspaceIdsResponse response) throws Exception { setSession(response.getSession()); Proto.checkError(response.getError()); return Futures.<Cursor>immediateFuture(new SimpleCursor(response.getResult())); } },
@Override public ListenableFuture<List<Cursor>> apply(ExecuteBatchShardsResponse response) throws Exception { setSession(response.getSession()); Proto.checkError(response.getError()); return Futures.<List<Cursor>>immediateFuture( Proto.toCursorList(response.getResultsList())); } },
@Override public ListenableFuture<List<CursorWithError>> apply(Vtgate.ExecuteBatchResponse response) throws Exception { vtSession.setSession(response.getSession()); Proto.checkError(response.getError()); return Futures.immediateFuture( Proto.fromQueryResponsesToCursorList(response.getResultsList())); } }, directExecutor()));
@Override public ListenableFuture<Cursor> apply(ExecuteShardsResponse response) throws Exception { setSession(response.getSession()); Proto.checkError(response.getError()); return Futures.<Cursor>immediateFuture(new SimpleCursor(response.getResult())); } },