Examples of await()


Examples of edu.emory.mathcs.backport.java.util.concurrent.CountDownLatch.await()

        in.setBody("Hello");
        in.setHeader("cheese", 123);
        producer.process(exchange);
       
        // The Activated endpoint should send it to the pojo due to the configured route.
        assertTrue("The message ware received by the Pojo", receivedCountDown.await(5, TimeUnit.SECONDS));
       

  }

    @Override
View Full Code Here

Examples of edu.emory.mathcs.backport.java.util.concurrent.CyclicBarrier.await()

        final CyclicBarrier barrier = new CyclicBarrier(WORKER_COUNT+1);
        for( int i=0; i< WORKER_COUNT; i++ ) {
            new Thread() {
                public void run() {
                    try {
                        barrier.await();
                        for( int i=0; i < ENQUEUE_COUNT/WORKER_COUNT; i++ ) {
                            queue.incrementAndGet();
                            runner.wakeup();
                            yield();
                        }
View Full Code Here

Examples of edu.ucla.sspace.util.WorkQueue.await()

                public void run() {
                    clusterTerm(senseName, contextSet, props);
                }
            });
        }
        workQueue.await(key);
        LOG.info("Finished processing all terms");
    }

    /**
     * Clusters the context vectors associated with {@link senseName}.
View Full Code Here

Examples of eu.mosaic_cloud.components.implementations.basic.BasicComponent.await()

      Assert.assertEquals (outboundRequest.reference, inboundReply.reference);
      Assert.assertEquals (outboundRequest.inputs, inboundReply.outputsOrError);
      Assert.assertEquals (outboundRequest.data, inboundReply.data);
    }
    pipe.sink ().close ();
    Assert.assertTrue (component.await (BasicComponentTest.defaultPollTimeout * 10));
    Assert.assertTrue (component.destroy (BasicComponentTest.defaultPollTimeout));
    Assert.assertTrue (channel.destroy (BasicComponentTest.defaultPollTimeout));
    Assert.assertTrue (componentCallbacksIsolate.destroy ().await (BasicComponentTest.defaultPollTimeout));
    Assert.assertTrue (reactor.destroy (BasicComponentTest.defaultPollTimeout));
    Assert.assertTrue (threading.destroy (BasicComponentTest.defaultPollTimeout));
View Full Code Here

Examples of io.netty.channel.ChannelFuture.await()

        ChannelFuture f = bootstrap.connect();
       
        try
        {
            f.await();
        }
        catch (InterruptedException ex)
        {
            logger.error("Thread interrupted waiting for new connection to be made; {}",
                remoteAddress);
View Full Code Here

Examples of io.netty.channel.ChannelPromise.await()

            {
               while (true)
               {
                  try
                  {
                     boolean ok = promise.await(10000);

                     if (!ok)
                     {
                        HornetQClientLogger.LOGGER.timeoutFlushingPacket();
                     }
View Full Code Here

Examples of io.undertow.util.CompletionLatchHandler.await()

        DefaultServer.setRootHandler(latchHandler = new CompletionLatchHandler(logHandler));
        TestHttpClient client = new TestHttpClient();
        try {
            HttpGet get = new HttpGet(DefaultServer.getDefaultServerURL() + "/path");
            HttpResponse result = client.execute(get);
            latchHandler.await();
            logHandler.awaitWrittenForTest();
            Assert.assertEquals(StatusCodes.OK, result.getStatusLine().getStatusCode());
            Assert.assertEquals("Hello", HttpClientUtils.readResponse(result));
        } finally {
            Connection conn = null;
View Full Code Here

Examples of java.util.concurrent.CountDownLatch.await()

        int timeoutToConverge=120;
        boolean successConnecting  = false;
        try {
            // Wait for all channels to finish connecting
            successConnecting=latch.await(timeoutToConverge, TimeUnit.SECONDS);           
            if(successConnecting) {
                log.info("All connected. Converging...");
                for(Task t:tasks) {
                    Throwable ex=t.getException();
                    if(ex != null)
View Full Code Here

Examples of java.util.concurrent.CyclicBarrier.await()

        final CyclicBarrier barrier=new CyclicBarrier(2);

        Thread thread=new Thread() {
            public void run() {
                try {
                    barrier.await();
                    Util.sleep(1000);
                    replenishAll(100);
                }
                catch(Exception e) {
                    e.printStackTrace();
View Full Code Here

Examples of java.util.concurrent.atomic.AtomicInteger.await()

                .path("/secure")
                .timeout(5, TimeUnit.SECONDS)
                .send();
        Assert.assertNotNull(response);
        Assert.assertEquals(200, response.getStatus());
        Assert.assertTrue(requests.await(5, TimeUnit.SECONDS));
        client.getRequestListeners().remove(requestListener);
    }

    @Test
    public void test_Redirect_ThenBasicAuthentication() throws Exception
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.