Examples of await()


Examples of akka.dispatch.Future.await()

        try {
            incrementLatch.await(timeout, TimeUnit.SECONDS);
        } catch (InterruptedException exception) {}
        for (ActorRef counter : counters) {
            Future future = counter.sendRequestReplyFuture("GetCount");
            future.await();
            if (future.isCompleted()) {
                Option resultOption = future.result();
                if (resultOption.isDefined()) {
                    Object result = resultOption.get();
                    int count = (Integer) result;
View Full Code Here

Examples of at.molindo.esi4j.rebuild.util.BulkIndexHelper.await()

           */
          listener.close();
        }

        try {
          h.await();

          long seconds = (System.currentTimeMillis() - start) / 1000;

          // logging
          StringBuilder logMsg = new StringBuilder("finished indexing of ").append(h.getSucceeded())
View Full Code Here

Examples of co.paralleluniverse.strands.Condition.await()

            private void foo() throws InterruptedException, SuspendExecution {
                Object token = cond.register();
                try {
                    for (int i = 0; !flag.get(); i++)
                        cond.await(i);
                } finally {
                    cond.unregister(token);
                }
            }
        }).start();
View Full Code Here

Examples of co.paralleluniverse.strands.SimpleConditionSynchronizer.await()

            private void foo() throws InterruptedException, SuspendExecution {
                Object token = cond.register();
                try {
                    for (int i = 0; !flag.get(); i++)
                        cond.await(i);
                } finally {
                    cond.unregister(token);
                }
            }
        }).start();
View Full Code Here

Examples of com.alibaba.otter.node.etl.load.loader.weight.WeightBarrier.await()

    @Test
    public void test_simple() {
        final WeightBarrier barrier = new WeightBarrier(10);
        try {
            barrier.await(10);// 可以成功通过
        } catch (InterruptedException e1) {
            want.fail();
        }

        try {
View Full Code Here

Examples of com.basho.riak.client.core.operations.DtUpdateOperation.await()

                                        .withReturnBody(returnBody)
                                        .build();
       
        cluster.execute(update);
       
        update.await();
       
        if (!update.isSuccess())
        {
            fail("Update operation failed: " + update.cause().toString());
        }
View Full Code Here

Examples of com.basho.riak.client.core.operations.FetchOperation.await()

        cluster.execute(operation);
       
        try
        {
            operation.await();
            assertFalse(operation.isSuccess());
            assertNotNull(operation.cause());
        }
        finally
        {
View Full Code Here

Examples of com.basho.riak.client.core.operations.MapReduceOperation.await()

        MapReduceOperation mrOp =
            new MapReduceOperation.Builder(BinaryValue.unsafeCreate(query.getBytes()))
                .build();
       
        cluster.execute(mrOp);
        mrOp.await();
        assertTrue(mrOp.isSuccess());
        ArrayNode resultList = mrOp.get().getResults().get(1);
       
        // The query should return one result which is a JSON array containing a
        // single JSON object that is a asSet of word counts.
View Full Code Here

Examples of com.basho.riak.client.core.operations.PingOperation.await()

    public void theMachinethatGoesPing() throws InterruptedException, ExecutionException
    {
        PingOperation ping = new PingOperation();
        cluster.execute(ping);
       
        ping.await();
        assertTrue(ping.isSuccess());
    }
   
    @Test
    public void theMachineThatDoesntGoPing() throws UnknownHostException, InterruptedException
View Full Code Here

Examples of com.basho.riak.client.core.operations.SearchOperation.await()

        Thread.sleep(5000);
       
        SearchOperation searchOp = new SearchOperation.Builder(BinaryValue.create("test_index"), "multi_ss:t*").build();
       
        cluster.execute(searchOp);
        searchOp.await();
        assertTrue(searchOp.isSuccess());
        SearchOperation.Response result = searchOp.get();       
        for (Map<String, List<String>> map : result.getAllResults())
        {
            assertFalse(map.isEmpty());
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.