Package org.hive2hive.core

Examples of org.hive2hive.core.H2HWaiter


   *            the file to synchronize
   * @param appearing
   *            <code>true</code> if file should appear, <code>false</code> if file should disappear
   */
  private static void waitTillSynchronizedAdding(File synchronizingFile) {
    H2HWaiter waiter = new H2HWaiter(40);
    do {
      waiter.tickASecond();
    } while (!synchronizingFile.exists());
  }
View Full Code Here


   *            the file to synchronize
   * @param appearing
   *            <code>true</code> if file should appear, <code>false</code> if file should disappear
   */
  private static void waitTillSynchronizedUpdating(File updatingFile, long lastModified) {
    H2HWaiter waiter = new H2HWaiter(40);
    do {
      waiter.tickASecond();
    } while (updatingFile.lastModified() == lastModified);
  }
View Full Code Here

   *            the file to synchronize
   * @param appearing
   *            <code>true</code> if file should appear, <code>false</code> if file should disappear
   */
  private static void waitTillSynchronized(File synchronizingFile, boolean appearing) {
    H2HWaiter waiter = new H2HWaiter(40);
    if (appearing) {
      do {
        waiter.tickASecond();
      } while (!synchronizingFile.exists());
    } else {
      do {
        waiter.tickASecond();
      } while (synchronizingFile.exists());
    }
  }
View Full Code Here

   *            the file to synchronize
   * @param appearing
   *            <code>true</code> if file should appear, <code>false</code> if file should disappear
   */
  private static void waitTillSynchronized(File synchronizingFile, boolean appearing) {
    H2HWaiter waiter = new H2HWaiter(40);
    if (appearing) {
      do {
        waiter.tickASecond();
      } while (!synchronizingFile.exists());
    } else {
      do {
        waiter.tickASecond();
      } while (synchronizingFile.exists());
    }
  }
View Full Code Here

   *            the file to synchronize
   * @param appearing
   *            <code>true</code> if file should appear, <code>false</code> if file should disappear
   */
  private static void waitTillSynchronized(File synchronizingFile, boolean appearing) {
    H2HWaiter waiter = new H2HWaiter(40);
    if (appearing) {
      do {
        waiter.tickASecond();
      } while (!synchronizingFile.exists());
    } else {
      do {
        waiter.tickASecond();
      } while (synchronizingFile.exists());
    }
  }
View Full Code Here

   *
   * @param synchronizingFile
   *            the file to synchronize
   */
  private static void waitTillSynchronized(File synchronizingFile) {
    H2HWaiter waiter = new H2HWaiter(40);
    do {
      waiter.tickASecond();
    } while (!synchronizingFile.exists());
  }
View Full Code Here

    IProcessComponent process = ProcessFactory.instance().createUpdateFileProcess(file, uploader);
    TestProcessComponentListener listener = new TestProcessComponentListener();
    process.attachListener(listener);
    process.start();

    H2HWaiter waiter = new H2HWaiter(60);
    do {
      waiter.tickASecond();
    } while (!listener.hasFailed());

    // verify if the md5 hash did not change
    UserProfile userProfile = UseCaseTestUtil.getUserProfile(downloader, userCredentials);
    FileIndex fileNode = (FileIndex) userProfile.getFileByPath(file, uploaderRoot);
View Full Code Here

      }
    };
    UseCaseTestUtil.executeProcess(step);

    // wait till message gets handled
    H2HWaiter w = new H2HWaiter(10);
    do {
      w.tickASecond();
      futureGet = nodeA.getDataManager().getUnblocked(parameters);
      futureGet.awaitUninterruptibly();
    } while (futureGet.getData() == null);

    // verify that data arrived
View Full Code Here

      }
    };
    UseCaseTestUtil.executeProcess(step);

    // wait till response message gets handled
    H2HWaiter waiter = new H2HWaiter(10);
    do {
      waiter.tickASecond();
      futureGet = nodeA.getDataManager().getUnblocked(parametersA);
      futureGet.awaitUninterruptibly();
    } while (futureGet.getData() == null);

    // load and verify if same secret was shared
View Full Code Here

      }
    };
    UseCaseTestUtil.executeProcess(step);

    // wait till message gets handled
    H2HWaiter w = new H2HWaiter(10);
    do {
      w.tickASecond();
      futureGet = nodeB.getDataManager().getUnblocked(parameters);
      futureGet.awaitUninterruptibly();
    } while (futureGet.getData() == null);

    // verify that data arrived
View Full Code Here

TOP

Related Classes of org.hive2hive.core.H2HWaiter

Copyright © 2018 www.massapicom. 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.