@Test(timeout = 60000) public void testPollRemovesItem() throws Exception { PooledConnection<String, String> connection1 = preferCurrentELHolderRule.addConnection(); PooledConnection<String, String> connection = preferCurrentELHolderRule.holder.poll() .defaultIfEmpty(null) .toBlocking().single(); assertThat("Connection not available with poll.", connection, is(connection1)); connection = preferCurrentELHolderRule.holder.poll() .defaultIfEmpty(null) .toBlocking().single(); assertThat("Connection available after poll.", connection, is(nullValue())); }
@Override public Observable<PooledConnection<R, W>> poll() { return pollObservable; }
PreferCurrentEventLoopHolder extends IdleConnectionsHolder<W, R> { @Override public Observable<PooledConnection<R, W>> poll() { return pollObservable; } }
PreferCurrentEventLoopHolder extends IdleConnectionsHolder<W, R> { @Override public Observable<PooledConnection<R, W>> poll() { return pollObservable; } PreferCurrentEventLoopHolder(PreferCurrentEventLoopGroup eventLoopGroup);   PreferCurrentEventLoopHolder(PreferCurrentEventLoopGroup eventLoopGroup,
                                 final IdleConnectionsHolderFactory<W, R> holderFactory); }
PreferCurrentEventLoopHolder extends IdleConnectionsHolder<W, R> { @Override public Observable<PooledConnection<R, W>> poll() { return pollObservable; } PreferCurrentEventLoopHolder(PreferCurrentEventLoopGroup eventLoopGroup);   PreferCurrentEventLoopHolder(PreferCurrentEventLoopGroup eventLoopGroup,
                                 final IdleConnectionsHolderFactory<W, R> holderFactory); @Override Observable<PooledConnection<R, W>> poll(); @Override Observable<PooledConnection<R, W>> pollThisEventLoopConnections(); @Override Observable<PooledConnection<R, W>> peek(); @Override void add(final PooledConnection<R, W> toAdd); @Override boolean remove(PooledConnection<R, W> toRemove); }
PreferCurrentEventLoopHolder extends IdleConnectionsHolder<W, R> { @Override public Observable<PooledConnection<R, W>> poll() { return pollObservable; } PreferCurrentEventLoopHolder(PreferCurrentEventLoopGroup eventLoopGroup);   PreferCurrentEventLoopHolder(PreferCurrentEventLoopGroup eventLoopGroup,
                                 final IdleConnectionsHolderFactory<W, R> holderFactory); @Override Observable<PooledConnection<R, W>> poll(); @Override Observable<PooledConnection<R, W>> pollThisEventLoopConnections(); @Override Observable<PooledConnection<R, W>> peek(); @Override void add(final PooledConnection<R, W> toAdd); @Override boolean remove(PooledConnection<R, W> toRemove);  }