@Test(timeout = 60000) public void testRelease() throws Exception { _testRelease(); }
@Override public Observable<Void> release(final PooledConnection<?, ?> connection) { @SuppressWarnings("unchecked") final PooledConnection<R, W> c = (PooledConnection<R, W>) connection; return Observable.create(new OnSubscribe<Void>() { @Override public void call(Subscriber<? super Void> subscriber) { if (null == c) { subscriber.onCompleted(); } else { c.unsafeNettyChannel() .eventLoop() .submit(new ReleaseTask(c, subscriber)); } } }); }
PooledConnectionProviderImpl extends PooledConnectionProvider<W, R> { @Override public Observable<Void> release(final PooledConnection<?, ?> connection) { @SuppressWarnings("unchecked") final PooledConnection<R, W> c = (PooledConnection<R, W>) connection; return Observable.create(new OnSubscribe<Void>() { @Override public void call(Subscriber<? super Void> subscriber) { if (null == c) { subscriber.onCompleted(); } else { c.unsafeNettyChannel() .eventLoop() .submit(new ReleaseTask(c, subscriber)); } } }); } }
PooledConnectionProviderImpl extends PooledConnectionProvider<W, R> { @Override public Observable<Void> release(final PooledConnection<?, ?> connection) { @SuppressWarnings("unchecked") final PooledConnection<R, W> c = (PooledConnection<R, W>) connection; return Observable.create(new OnSubscribe<Void>() { @Override public void call(Subscriber<? super Void> subscriber) { if (null == c) { subscriber.onCompleted(); } else { c.unsafeNettyChannel() .eventLoop() .submit(new ReleaseTask(c, subscriber)); } } }); } PooledConnectionProviderImpl(PoolConfig<W, R> poolConfig, HostConnector<W, R> hostConnector); }
PooledConnectionProviderImpl extends PooledConnectionProvider<W, R> { @Override public Observable<Void> release(final PooledConnection<?, ?> connection) { @SuppressWarnings("unchecked") final PooledConnection<R, W> c = (PooledConnection<R, W>) connection; return Observable.create(new OnSubscribe<Void>() { @Override public void call(Subscriber<? super Void> subscriber) { if (null == c) { subscriber.onCompleted(); } else { c.unsafeNettyChannel() .eventLoop() .submit(new ReleaseTask(c, subscriber)); } } }); } PooledConnectionProviderImpl(PoolConfig<W, R> poolConfig, HostConnector<W, R> hostConnector); @Override Observable<Connection<R, W>> newConnectionRequest(); @Override Observable<Void> release(final PooledConnection<?, ?> connection); @Override Observable<Void> discard(final PooledConnection<?, ?> connection); }
PooledConnectionProviderImpl extends PooledConnectionProvider<W, R> { @Override public Observable<Void> release(final PooledConnection<?, ?> connection) { @SuppressWarnings("unchecked") final PooledConnection<R, W> c = (PooledConnection<R, W>) connection; return Observable.create(new OnSubscribe<Void>() { @Override public void call(Subscriber<? super Void> subscriber) { if (null == c) { subscriber.onCompleted(); } else { c.unsafeNettyChannel() .eventLoop() .submit(new ReleaseTask(c, subscriber)); } } }); } PooledConnectionProviderImpl(PoolConfig<W, R> poolConfig, HostConnector<W, R> hostConnector); @Override Observable<Connection<R, W>> newConnectionRequest(); @Override Observable<Void> release(final PooledConnection<?, ?> connection); @Override Observable<Void> discard(final PooledConnection<?, ?> connection);  }