@Test(expected = RetryException.class) public void testAllocate_Fail() throws Exception { when(allocator.allocate(slot)).thenThrow(new IOException()); retryingAllocator.allocate(slot); }
@Override public V allocate(final Slot slot) throws Exception { return retryer.call(new Callable<V>() { @Override public V call() throws Exception { return allocator.allocate(slot); } }); }
RetryingAllocator implements Allocator<V> { @Override public V allocate(final Slot slot) throws Exception { return retryer.call(new Callable<V>() { @Override public V call() throws Exception { return allocator.allocate(slot); } }); } }
RetryingAllocator implements Allocator<V> { @Override public V allocate(final Slot slot) throws Exception { return retryer.call(new Callable<V>() { @Override public V call() throws Exception { return allocator.allocate(slot); } }); } RetryingAllocator(Allocator<V> allocator);  RetryingAllocator(Allocator<V> allocator, long waitInterval, long maxWaitInterval); }
RetryingAllocator implements Allocator<V> { @Override public V allocate(final Slot slot) throws Exception { return retryer.call(new Callable<V>() { @Override public V call() throws Exception { return allocator.allocate(slot); } }); } RetryingAllocator(Allocator<V> allocator);  RetryingAllocator(Allocator<V> allocator, long waitInterval, long maxWaitInterval); @Override V allocate(final Slot slot); @Override void deallocate(V poolable); }
RetryingAllocator implements Allocator<V> { @Override public V allocate(final Slot slot) throws Exception { return retryer.call(new Callable<V>() { @Override public V call() throws Exception { return allocator.allocate(slot); } }); } RetryingAllocator(Allocator<V> allocator);  RetryingAllocator(Allocator<V> allocator, long waitInterval, long maxWaitInterval); @Override V allocate(final Slot slot); @Override void deallocate(V poolable);  }