Examples of await()


Examples of org.apache.felix.framework.util.ThreadGate.await()

        // Grab a copy of the gate, since it is volatile.
        ThreadGate gate = m_shutdownGate;
        boolean open = false;
        if (gate != null)
        {
            open = gate.await(timeout);
        }

        FrameworkEvent event;
        if (open && (gate.getMessage() != null))
        {
View Full Code Here

Examples of org.apache.hadoop.hbase.hbql.client.QueryFuture.await()

                                                            e.printStackTrace();
                                                        }
                                                    });

        try {
            future.await();
        }
        catch (InterruptedException e) {
            e.printStackTrace();
        }
View Full Code Here

Examples of org.apache.hadoop.hdfs.server.namenode.bookkeeper.zk.ConnectionWatcher.await()

    ZooKeeper zooKeeper = new ZooKeeper(zkConnect, zkSessionTimeoutMs,
        connectionWatcher);
    // Use twice session timeout as the connection timeout
    int zkConnectTimeoutMs = zkSessionTimeoutMs * 2;

    if (!connectionWatcher.await(zkConnectTimeoutMs)) {
      throw new IOException("Timed out waiting to connect to " + zkConnect
          + " after " + (zkSessionTimeoutMs * 2) + " ms.");
    }
    prepareBookKeeperEnv(ledgersAvailablePath, zooKeeper);

View Full Code Here

Examples of org.apache.hadoop.yarn.event.DrainDispatcher.await()

    // update resources in scheduler
    nodeManager1.nodeHeartbeat(true); // Node heartbeat
    nodeManager2.nodeHeartbeat(true); // Node heartbeat
    nodeManager3.nodeHeartbeat(true); // Node heartbeat
    dispatcher.await();

    assigned = allocator.schedule();
    dispatcher.await();
    checkAssignments(new ContainerRequestEvent[] { event1, event3 },
        assigned, false);
View Full Code Here

Examples of org.apache.http.impl.nio.mockup.CountingEventListener.await()

            this.client.openConnection(
                    new InetSocketAddress("localhost", serverAddress.getPort()),
                    responseData[i]);
        }
    
        clientEventListener.await(connNo, 1000);
        assertEquals(connNo, clientEventListener.getConnCount());
       
        this.client.shutdown();
        this.server.shutdown();
View Full Code Here

Examples of org.apache.http.mockup.RequestCount.await()

        assertEquals(0, requestConns.getValue());
    
        this.client.shutdown();
        this.server.shutdown();
       
        closedClientConns.await(10000);
        assertEquals(0, closedClientConns.getValue());
    
        closedServerConns.await(10000);
        assertEquals(0, closedServerConns.getValue());
    }
View Full Code Here

Examples of org.apache.http.nio.mockup.CountingEventListener.await()

            this.client.openConnection(
                    new InetSocketAddress("localhost", serverAddress.getPort()),
                    responseData[i]);
        }
    
        clientEventListener.await(connNo, 1000);
        assertEquals(connNo, clientEventListener.getConnCount());
       
        this.client.shutdown();
        this.server.shutdown();
View Full Code Here

Examples of org.apache.karaf.features.internal.download.Downloader.await()

                    ResourceImpl res = createResource(loc, provider.getMetadata());
                    bundles.put(loc, res);
                }
            });
        }
        downloader.await();
        Overrides.override(bundles, overrides);
        if (feature != null) {
            // Add conditionals
            Map<Conditional, Resource> resConds = new HashMap<>();
            for (Conditional cond : feature.getConditional()) {
View Full Code Here

Examples of org.apache.mina.common.ConnectFuture.await()

                        }
                    });

                    ConnectFuture c2Future = c2.connect(address);

                    c2Future.await();

                    latch.await();

                    c2Future.getSession().write("please don't deadlock via c2");
                } else {
View Full Code Here

Examples of org.apache.mina.core.future.ConnectFuture.await()

  {
     ConnectFuture cf = connector.connect(new InetSocketAddress(port.getAddress(), port.getPort()));
    
     //等待连接结果
       try {
      cf.await();
    } catch (InterruptedException e) {
      throw new TransferException(e);
    }
   
    //判断是否连接成功,如果不成功抛出异常
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.