Package net.tomp2p.futures

Examples of net.tomp2p.futures.FutureDigest.addListener()


  }

  public NavigableMap<Number640, Number160> getDigest(IParameters parameters) {
    FutureDigest futureDigest = getDigestUnblocked(parameters);
    FutureDigestListener listener = new FutureDigestListener(parameters);
    futureDigest.addListener(listener);
    return listener.awaitAndGet();
  }

  public FutureDigest getDigestUnblocked(IParameters parameters) {
    logger.debug("Get digest. {}", parameters.toString());
View Full Code Here


  @Override
  public void operationComplete(FutureRemove future) throws Exception {
    logger.trace("Start verification of remove. '{}'", parameters.toString());
    // get data to verify if everything went correct
    FutureDigest digestFuture = dataManager.getDigestUnblocked(parameters);
    digestFuture.addListener(new BaseFutureAdapter<FutureDigest>() {
      @Override
      public void operationComplete(FutureDigest future) throws Exception {
        if (future.getDigest() == null) {
          retryRemove();
        } else if (!future.getDigest().keyDigest().isEmpty()) {
View Full Code Here

   * Loads digest and triggers a check.
   */
  private void verifyPut() {
    // get data to verify if everything went correct
    FutureDigest digestFuture = dataManager.getDigestUnblocked(parameters);
    digestFuture.addListener(new BaseFutureAdapter<FutureDigest>() {
      @Override
      public void operationComplete(FutureDigest future) throws Exception {
        if (future.isFailed() || future.getRawDigest() == null || future.getRawDigest().isEmpty()) {
          logger.error("Put verification failed. Could not get digest. '{}'", parameters.toString());
          notifyFailure();
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.