Examples of await()


Examples of java.util.concurrent.locks.Condition.await()

        lock.lock();
        try {
            while(delivered_msgs.get() < num_msgs) {
                try {
                    all_msgs_delivered.await(1000, TimeUnit.MILLISECONDS);
                    System.out.println("received " + delivered_msgs.get() + " msgs");
                   
                    // send a spurious message to trigger removal of pending messages in AckReceiverWindow
                    msg=createMessage(local_addr, sender, 1L, oob, false);
                    unicast.up(new Event(Event.MSG, msg));
View Full Code Here

Examples of net.jodah.concurrentunit.Waiter.await()

    // Call initial shutdown listener
    callShutdownListener(initialResource,
        initialResource instanceof ConnectionHandler ? connectionShutdownSignal()
            : channelShutdownSignal());
    if (expectedResumes > 0)
      waiter.await(1000);
    Thread.sleep(100);
  }

  /** Mock recovery for the resource, with recovery attempts failing because of {@code e}. */
  abstract void mockRecovery(Exception e, RetryableResource retryableResource) throws IOException;
View Full Code Here

Examples of net.kuujo.copycat.test.TestNode.await()

    Protocol<Member> protocol = new LocalProtocol();
    TestCluster cluster = new TestCluster();
    TestNode node1 = new TestNode().withCluster("foo").withProtocol(protocol);
    cluster.addNode(node1);
    cluster.start();
    node1.await().electedLeader();
    Assert.assertTrue(node1.instance().isLeader());
    cluster.stop();
  }

  /**
 
View Full Code Here

Examples of net.myrrix.online.ServerRecommender.await()

      } catch (IOException ioe) {
        throw new TasteException(ioe);
      }

      recommender = new ServerRecommender(tempDir);
      recommender.await();

      Generation generation = recommender.getGenerationManager().getCurrentGeneration();
      FastByIDMap<float[]> X = generation.getX();
      FastByIDMap<float[]> Y = generation.getY();
View Full Code Here

Examples of net.tomp2p.futures.FutureDirect.await()

          Buffer ret = new Buffer(c);
          return ret;
        }
      });
      FutureDirect fd = master.peer().sendDirect(peers[50].peerAddress()).buffer(b).start();
      fd.await();
      if (fd.buffer() == null) {
        System.err.println("damm");
        Assert.fail();
      }
      int read = fd.buffer().buffer().readInt();
View Full Code Here

Examples of net.tomp2p.futures.FutureResponse.await()

                @Override
                public void operationComplete(final FutureResponse future) throws Exception {
                    FutureResponse fr2 = sender.pingRPC().pingTCP(recv1.peerAddress(), cc1,
                            new DefaultConnectionConfiguration());
                    try {
                        fr2.await();
                    } catch (IllegalStateException ise) {
                        Assert.fail();
                    }
                }
            });
View Full Code Here

Examples of org.apache.accumulo.server.tabletserver.log.DfsLogger.LoggerOperation.await()

            if (lop != null)
              queuedOperations.add(lop);
          }
         
          for (LoggerOperation lop : queuedOperations) {
            lop.await();
          }
         
          // double-check: did the log set change?
          success = (currentLogSet == logSetId.get());
        }
View Full Code Here

Examples of org.apache.accumulo.tserver.log.DfsLogger.LoggerOperation.await()

            if (lop != null)
              queuedOperations.add(lop);
          }
         
          for (LoggerOperation lop : queuedOperations) {
            lop.await();
          }
         
          // double-check: did the log set change?
          success = (currentLogSet == logSetId.get());
        }
View Full Code Here

Examples of org.apache.activemq.leveldb.CountDownFuture.await()

        master.setReplicas(2);
        CountDownFuture masterStartLatch = asyncStart(master);

        // Start the store should not complete since we don't have enough
        // replicas.
        assertFalse(masterStartLatch.await(2, TimeUnit.SECONDS));

        // Adding a slave should allow the master startup to complete.
        SlaveLevelDBStore slave = createSlave(master, slaveDir);
        slave.start();
View Full Code Here

Examples of org.apache.bookkeeper.replication.ReplicationEnableCb.await()

    private void waitIfLedgerReplicationDisabled() throws UnavailableException,
            InterruptedException {
        ReplicationEnableCb cb = new ReplicationEnableCb();
        if (!this.isLedgerReplicationEnabled()) {
            this.notifyLedgerReplicationEnabled(cb);
            cb.await();
        }
    }

    @Override
    public void releaseUnderreplicatedLedger(long ledgerId) throws ReplicationException.UnavailableException {
View Full Code Here
TOP
Copyright © 2015 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.