Examples of Cancellable


Examples of org.springframework.cassandra.core.Cancellable

  @Test(expected = CancellationException.class)
  public void testString_AsynchronousQueryListener_Cancelled() throws InterruptedException {
    new AsynchronousQueryListenerTestTemplate() {
      @Override
      void doAsyncQuery(Book b, BasicListener listener) {
        Cancellable qc = t.queryAsynchronously(cql(b), listener);
        qc.cancel();
      }
    }.test();
  }
View Full Code Here

Examples of org.xnio.Cancellable

    }

    @Override
    public IoFuture<HttpClientConnection> connect(final XnioIoThread ioThread, final SocketAddress destination, final OptionMap optionMap) {
        final FutureResult<HttpClientConnection> result = new FutureResult<HttpClientConnection>();
        result.addCancelHandler(new Cancellable() {
            @Override
            public Cancellable cancel() {
                result.setCancelled();
                return this;
            }
View Full Code Here

Examples of org.xnio.Cancellable

                if (res.getStatus() == IoFuture.Status.FAILED) {
                    ioFuture.setException(res.getException());
                }
            }
        }, null);
        ioFuture.addCancelHandler(new Cancellable() {
            @Override
            public Cancellable cancel() {
                result.cancel();
                return null;
            }
View Full Code Here

Examples of org.xnio.Cancellable

                if (res.getStatus() == IoFuture.Status.FAILED) {
                    ioFuture.setException(res.getException());
                }
            }
        }, null);
        ioFuture.addCancelHandler(new Cancellable() {
            @Override
            public Cancellable cancel() {
                result.cancel();
                return null;
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.