t.getRange(TABLE_SWEPT_THOROUGH, RangeRequest.all()).batchAccept(batchHint, AbortingVisitors.alwaysTrue()); return null; })); BatchColumnRangeSelection.create(new ColumnRangeSelection(null, null), batchHint)) .values(); results.forEach(result -> result.batchAccept(batchHint, AbortingVisitors.alwaysTrue())); return null; }));
@Test public void testConcat() { BatchingVisitable<Long> visitor = ListVisitor.create(Lists.newArrayList(0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L)); BatchingVisitableView<Long> limited = BatchingVisitableView.of(visitor).limit(3); BatchingVisitableView<Long> concat = BatchingVisitables.concat(limited, visitor); assertTrue("concatenated batchAccept should be true", concat.batchAccept(2, AbortingVisitors .batching(AbortingVisitors.alwaysTrue()))); }
assertTrue("alwaysTrue should be true", limited.batchAccept(1, AbortingVisitors.alwaysTrue())); assertTrue("alwaysTrue should be true twice", limited.batchAccept(2, AbortingVisitors.alwaysTrue())); assertTrue("alwaysTrue should be true thrice", limited.batchAccept(3, AbortingVisitors.alwaysTrue()));