@Override public String getChunkPath() { return delegate.getChunkPath(); }
@Override public boolean hasNext() { return delegate.hasNext(); }
@Override public void next(Handler<AsyncResult<ChunkMeta>> handler) { delegate.next(handler); }
if (cursor.hasNext()) { cursor.next(ar -> { if (ar.failed()) { handler.handle(Future.failedFuture(ar.cause())); } else { paths.add(cursor.getChunkPath()); int size = cursor.getInfo().getCurrentHits(); doDeleteBulk(paths, cursor.getInfo().getTotalHits(), remainingChunks.get(), correlationId, handleBulk.apply(size)); } else { doDeleteBulk(paths, cursor.getInfo().getTotalHits(), remainingChunks.get(), correlationId, handleBulk.apply(paths.size())); } else {
context.assertTrue(cursor.hasNext()); cursor.next(h -> { ChunkMeta meta = h.result(); context.assertEquals(START, meta.getStart()); String fileName = cursor.getChunkPath();
@Override public void next(Handler<AsyncResult<ChunkMeta>> handler) { ++pos; if (pos >= totalHits) { handler.handle(Future.failedFuture(new IndexOutOfBoundsException( "Cursor is beyond a valid position."))); } else if (this.currentFrameCursor.hasNext()) { this.currentFrameCursor.next(handler); } else { new FrameCursor(vertx, scrollId).start(h -> { if (h.failed()) { handler.handle(Future.failedFuture(h.cause())); } else { handleFrameCursor(h.result()); this.currentFrameCursor.next(handler); } }); } }
@Override public CursorInfo getInfo() { return this.currentFrameCursor.getInfo(); } }
@Override public CursorInfo getInfo() { return delegate.getInfo(); }
@Override public String getChunkPath() { return this.currentFrameCursor.getChunkPath(); }
private void handleFrameCursor(StoreCursor framedCursor) { currentFrameCursor = framedCursor; CursorInfo info = framedCursor.getInfo(); this.totalHits = info.getTotalHits(); this.scrollId = info.getScrollId(); }
} else { StoreCursor cursor = ar.result(); AtomicLong remaining = new AtomicLong(cursor.getInfo().getTotalHits()); if (correlationId != null) { startPurgingTask(correlationId, remaining.intValue());