Package com.google.enterprise.connector.util

Examples of com.google.enterprise.connector.util.SystemClock


  MockInstantiator instantiator;
  AuthenticationIdentity identity;
  String connectorName;

  protected void setUp() throws Exception {
    ThreadPool threadPool = new ThreadPool(5, new SystemClock());
    instantiator = new MockInstantiator(threadPool);
    instantiator.setupTestTraversers();
    manager = new ProductionManager();
    manager.setInstantiator(instantiator);
    manager.setFeedConnection(new MockFeedConnection());
View Full Code Here


    byte[] output = new byte[4 + ((input.length * 4) / 3)];
    // Force these arrays to be paged in before starting the clock.
    System.arraycopy(input, 0, output, 0, input.length);
    System.arraycopy(input, 0, output, input.length,
                     output.length - input.length);
    Clock clock = new SystemClock();
    long start = clock.getTimeMillis();
    Base64.encode(input, 0, input.length, output, 0, Base64.ALPHABET,
                  Integer.MAX_VALUE);
    long duration = clock.getTimeMillis() - start;
    System.out.println("testSpeed: " + duration + " millisecs");
    // OriginalBase64Encoder used to run 20x longer than this one.
    // TODO: This threshold is already 10x longer than this test
    // takes on my machine, so I don't think this is a valid
    // regression test.  Fails on code coverage and Pulse.
View Full Code Here

  private void markEnd() {
    LOGGER.fine("Marking end");
    if (lastFullSync == 0L) {
      // lastFullSync = 0L indicates this was part of full crawl.
      lastFullSync = new SystemClock().getTimeMillis();
    }
    end = true;
  }
View Full Code Here

      // TODO: For manual testing this value can me modified to test various
      // scenarios. Other option is to modify connector checkpoint value
      // and restart CM for new value to take effect.
      long fullTraversalInterval =
          fullTraversalIntervalInDays * 24 * 60 * 60 * 1000L;
      long currentTime = new SystemClock().getTimeMillis();     
      if (existingProfileCheckpoint.getUserProfileLastFullSync() > 0L) {
        // Perform this check only if initial crawl is done and
        // LastFullSync value is available.
        long timeElapsed = currentTime -
            existingProfileCheckpoint.getUserProfileLastFullSync();
View Full Code Here

TOP

Related Classes of com.google.enterprise.connector.util.SystemClock

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.