Examples of await()


Examples of org.jboss.dna.graph.request.CompositeRequestChannel.await()

                        if (channel != null) {
                            try {
                                channel.close();
                            } finally {
                                try {
                                    channel.await();
                                } catch (CancellationException err) {
                                    composite.cancel();
                                } catch (ExecutionException err) {
                                    composite.setError(err);
                                } catch (InterruptedException err) {
View Full Code Here

Examples of org.jboss.netty.channel.ChannelFuture.await()

        }

        @Override
        public Void get() throws InterruptedException,
            ExecutionException {
          future.await();
          if (!future.isSuccess()) {
            throw new ExecutionException(future.getCause());
          }
          return null;
        }
View Full Code Here

Examples of org.jboss.netty.channel.group.ChannelGroupFuture.await()

  {
    LOG.debug("In stopServer method of class: {}",
        this.getClass().getName());
    ChannelGroupFuture future = ALL_CHANNELS.close();
    try {
      future.await();
    } catch (InterruptedException e) {
      LOG.error("Execption occurred while waiting for channels to close: {}",e);
    }
    super.stopServer();
  }
View Full Code Here

Examples of org.menagerie.latches.spi.ZkCyclicBarrier.await()

            public Void call() throws Exception {
                ZooKeeper otherZooKeeper = newZooKeeper();
                try {
                    DistributedCyclicBarrier otherCyclicBarrier = new ZkCyclicBarrier(2, new BaseZkSessionManager(otherZooKeeper), barrierPath);
                    System.out.printf("%s: Waiting on barrier%n",Thread.currentThread().getName());
                    otherCyclicBarrier.await();
                } finally {
                    otherZooKeeper.close();
                }
                System.out.printf("%s; Barrier returned on secondary thread%n",Thread.currentThread().getName());
                return null;
View Full Code Here

Examples of org.mule.tck.functional.CountdownCallback.await()

        assertNotNull(component);
        CountdownCallback count = new CountdownCallback(3);
        component.setEventCallback(count);

        new MuleClient(muleContext).dispatch("vm://quartz.scheduler", "quartz test", null);
        assertTrue(count.await(5000));
    }

    public void testMuleClientDispatchJobWithExpressionAddress() throws Exception
    {
        FunctionalTestComponent component = getFunctionalTestComponent("expressionScheduledService");
View Full Code Here

Examples of org.mule.util.concurrent.Latch.await()

        //This seems a little odd that we forward the exception to the outbound endpoint, but I guess users
        // can just add a filter
        assertNotNull(result);
        final int status = result.getInboundProperty(HttpConnector.HTTP_STATUS_PROPERTY, 0);
        assertEquals(401, status);
        assertTrue(latch.await(1000, TimeUnit.MILLISECONDS));

    }

    protected String getConfigResources()
    {
View Full Code Here

Examples of org.ofbiz.base.concurrent.DependencyPool.await()

            items.add(item);
            previousItems.add(item);
        }
        pool.addAll(items);
        pool.start();
        pool.await();
        assertEquals("result count", itemSize, pool.getResultCount());
        for (int i = 0; i < itemSize; i++) {
            TestItem item = items.get(i);
            assertEquals("item(" + i + ") result", Integer.toString(i), pool.getResult(item));
        }
View Full Code Here

Examples of org.openrdf.sail.federation.evaluation.FederationStatistics.await()

    new FederationJoinOptimizer(members, distinct, local).optimize(query, bindings);
    new OwnedTupleExprPruner().optimize(query, bindings);
    new QueryModelPruner().optimize(query, bindings);
    new QueryJoinOptimizer(statistics).optimize(query, bindings);
    new FederationFilterOptimizer().optimize(query, bindings);
    statistics.await(); // let statistics throw any exceptions it has

    new PrepareOwnedTupleExpr(federation.getMetaData()).optimize(query, bindings);

    logger.trace("Optimized query model:\n{}", query);
    return query;
View Full Code Here

Examples of org.redisson.core.RCountDownLatch.await()

        executor.execute(new Runnable() {
            @Override
            public void run() {
                try {
                    Assert.assertEquals(1, latch.getCount());
                    boolean res = latch.await(550, TimeUnit.MILLISECONDS);
                    Assert.assertTrue(res);
                } catch (InterruptedException e) {
                    Assert.fail();
                }
            }
View Full Code Here

Examples of org.sonatype.aether.util.concurrency.RunnableErrorForwarder.await()

            worker.setLogger( logger );
            worker.setFileProcessor( fileProcessor );
            executor.execute( errorForwarder.wrap( worker ) );
        }

        errorForwarder.await();
    }

    private <E> Collection<E> notNull( Collection<E> col )
    {
        return col == null ? Collections.<E> emptyList() : col;
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.