@Test(timeout = 60000) public void testPeek() throws Exception { PooledConnection<String, String> connection1 = preferCurrentELHolderRule.addConnection(); PooledConnection<String, String> connection = preferCurrentELHolderRule.holder.peek() .defaultIfEmpty(null) .toBlocking().single(); assertThat("Connection not available with peek.", connection, is(connection1)); connection = preferCurrentELHolderRule.holder.peek().defaultIfEmpty(null) .toBlocking().single(); assertThat("Connection not available after peek.", connection, not(nullValue())); assertThat("Unexpected connection on peek.", connection, is(connection1)); }
@Override public Observable<PooledConnection<R, W>> peek() { return peekObservable; }
PreferCurrentEventLoopHolder extends IdleConnectionsHolder<W, R> { @Override public Observable<PooledConnection<R, W>> peek() { return peekObservable; } }
PreferCurrentEventLoopHolder extends IdleConnectionsHolder<W, R> { @Override public Observable<PooledConnection<R, W>> peek() { return peekObservable; } PreferCurrentEventLoopHolder(PreferCurrentEventLoopGroup eventLoopGroup);   PreferCurrentEventLoopHolder(PreferCurrentEventLoopGroup eventLoopGroup,
                                 final IdleConnectionsHolderFactory<W, R> holderFactory); }
PreferCurrentEventLoopHolder extends IdleConnectionsHolder<W, R> { @Override public Observable<PooledConnection<R, W>> peek() { return peekObservable; } 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>> peek() { return peekObservable; } 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);  }