@Test public void testDelegatesSetOperationsFilterToAsyncCoordinator() { final CoalesceKeysFilter filter = new CoalesceKeysFilter(); asyncWriteBehind.setOperationsFilter(filter); ArgumentCaptor<OperationsFilterWrapper> captor = ArgumentCaptor.forClass(OperationsFilterWrapper.class); verify(asyncCoordinator).setOperationsFilter(captor.capture()); assertThat(captor.getAllValues().size(), is(1)); assertThat(captor.getValue().getDelegate(), CoreMatchers.<OperationsFilter<KeyBasedOperation>>sameInstance(filter)); }
@Override public void setOperationsFilter(OperationsFilter filter) { OperationsFilterWrapper filterWrapper = new OperationsFilterWrapper(filter); async.setOperationsFilter(filterWrapper); }
AsyncWriteBehind implements WriteBehind { @Override public void setOperationsFilter(OperationsFilter filter) { OperationsFilterWrapper filterWrapper = new OperationsFilterWrapper(filter); async.setOperationsFilter(filterWrapper); } }
AsyncWriteBehind implements WriteBehind { @Override public void setOperationsFilter(OperationsFilter filter) { OperationsFilterWrapper filterWrapper = new OperationsFilterWrapper(filter); async.setOperationsFilter(filterWrapper); } AsyncWriteBehind(final AsyncCoordinator async, final int writeBehindConcurrency); }
AsyncWriteBehind implements WriteBehind { @Override public void setOperationsFilter(OperationsFilter filter) { OperationsFilterWrapper filterWrapper = new OperationsFilterWrapper(filter); async.setOperationsFilter(filterWrapper); } AsyncWriteBehind(final AsyncCoordinator async, final int writeBehindConcurrency); @Override void start(CacheWriter writer); @Override void write(Element element); @Override void delete(CacheEntry entry); @Override void setOperationsFilter(OperationsFilter filter); @Override void stop(); @Override long getQueueSize(); }
AsyncWriteBehind implements WriteBehind { @Override public void setOperationsFilter(OperationsFilter filter) { OperationsFilterWrapper filterWrapper = new OperationsFilterWrapper(filter); async.setOperationsFilter(filterWrapper); } AsyncWriteBehind(final AsyncCoordinator async, final int writeBehindConcurrency); @Override void start(CacheWriter writer); @Override void write(Element element); @Override void delete(CacheEntry entry); @Override void setOperationsFilter(OperationsFilter filter); @Override void stop(); @Override long getQueueSize(); static final ItemScatterPolicy<SingleAsyncOperation> POLICY; }