Package com.google.enterprise.connector.util.diffing

Examples of com.google.enterprise.connector.util.diffing.CheckpointAndChangeQueue.resume()


      ChangeSource changeSource = new MockChangeSource(6);
      CheckpointAndChangeQueue q = new CheckpointAndChangeQueue(changeSource,
          persistDirA, internalFactory, clientFactory);
      q.setMaximumQueueSize(2);
      q.start(null);
      List<CheckpointAndChange> firstBatch = q.resume(null);
      String checkpoint = firstBatch.get(1).getCheckpoint().toString();
      List<CheckpointAndChange> secondBatch = q.resume(checkpoint);
      checkpoint = secondBatch.get(1).getCheckpoint().toString();
      q.resume(checkpoint);
      File recoveryFile = persistDirA.listFiles()[0];
View Full Code Here


          persistDirA, internalFactory, clientFactory);
      q.setMaximumQueueSize(2);
      q.start(null);
      List<CheckpointAndChange> firstBatch = q.resume(null);
      String checkpoint = firstBatch.get(1).getCheckpoint().toString();
      List<CheckpointAndChange> secondBatch = q.resume(checkpoint);
      checkpoint = secondBatch.get(1).getCheckpoint().toString();
      q.resume(checkpoint);
      File recoveryFile = persistDirA.listFiles()[0];
      recoveryFile.renameTo(new File(persistDir, recoveryFile.getName()));
    }
View Full Code Here

      q.start(null);
      List<CheckpointAndChange> firstBatch = q.resume(null);
      String checkpoint = firstBatch.get(1).getCheckpoint().toString();
      List<CheckpointAndChange> secondBatch = q.resume(checkpoint);
      checkpoint = secondBatch.get(1).getCheckpoint().toString();
      q.resume(checkpoint);
      File recoveryFile = persistDirA.listFiles()[0];
      recoveryFile.renameTo(new File(persistDir, recoveryFile.getName()));
    }

    List<CheckpointAndChange> secondBatch;
View Full Code Here

      ChangeSource changeSource = new MockChangeSource(6);
      CheckpointAndChangeQueue q = new CheckpointAndChangeQueue(changeSource,
          persistDirB, internalFactory, clientFactory);
      q.setMaximumQueueSize(2);
      q.start(null);
      List<CheckpointAndChange> firstBatch = q.resume(null);
      checkpoint = firstBatch.get(1).getCheckpoint().toString();
      secondBatch = q.resume(checkpoint);
      File recoveryFile = persistDirB.listFiles()[0];
      recoveryFile.renameTo(new File(persistDir, recoveryFile.getName()));
    }
View Full Code Here

          persistDirB, internalFactory, clientFactory);
      q.setMaximumQueueSize(2);
      q.start(null);
      List<CheckpointAndChange> firstBatch = q.resume(null);
      checkpoint = firstBatch.get(1).getCheckpoint().toString();
      secondBatch = q.resume(checkpoint);
      File recoveryFile = persistDirB.listFiles()[0];
      recoveryFile.renameTo(new File(persistDir, recoveryFile.getName()));
    }

    ChangeSource changeSource = new MockChangeSource(6);
View Full Code Here

    ChangeSource changeSource = new MockChangeSource(6);
    CheckpointAndChangeQueue q = new CheckpointAndChangeQueue(changeSource,
        persistDir, internalFactory, clientFactory);
    q.setMaximumQueueSize(2);
    q.start(checkpoint);
    List<CheckpointAndChange> secondBatchAgain = q.resume(checkpoint);
    assertEquals(secondBatch, secondBatchAgain);
    assertTrue(deleteDir(persistDirA));
    assertTrue(deleteDir(persistDirB));
  }
View Full Code Here

      ChangeSource changeSource = new MockChangeSource(6);
      CheckpointAndChangeQueue q = new CheckpointAndChangeQueue(changeSource,
          persistDirAux, internalFactory, clientFactory);
      q.setMaximumQueueSize(2);
      q.start(null);
      List<CheckpointAndChange> firstBatch = q.resume(null);
      checkpoint = firstBatch.get(1).getCheckpoint().toString();
      secondBatch = q.resume(checkpoint);
      File recoveryFile = persistDirAux.listFiles()[0];
      recoveryFile.renameTo(new File(persistDir, recoveryFile.getName()));
    }
View Full Code Here

          persistDirAux, internalFactory, clientFactory);
      q.setMaximumQueueSize(2);
      q.start(null);
      List<CheckpointAndChange> firstBatch = q.resume(null);
      checkpoint = firstBatch.get(1).getCheckpoint().toString();
      secondBatch = q.resume(checkpoint);
      File recoveryFile = persistDirAux.listFiles()[0];
      recoveryFile.renameTo(new File(persistDir, recoveryFile.getName()));
    }

    File persistFile = new File(persistDir, "recovery." + System.nanoTime());
View Full Code Here

    ChangeSource changeSource = new MockChangeSource(6);
    CheckpointAndChangeQueue q = new CheckpointAndChangeQueue(changeSource,
        persistDir, internalFactory, clientFactory);
    q.setMaximumQueueSize(2);
    q.start(checkpoint);
    List<CheckpointAndChange> secondBatchAgain = q.resume(checkpoint);
    assertEquals(secondBatch, secondBatchAgain);

    assertTrue(deleteDir(persistDirAux));
  }
View Full Code Here

    ChangeSource changeSource = new MockChangeSource(6);
    CheckpointAndChangeQueue q = new CheckpointAndChangeQueue(changeSource,
        persistDir, internalFactory, clientFactory);
    q.setMaximumQueueSize(2);
    q.start(null);
    List<CheckpointAndChange> firstBatch = q.resume(null);
    String checkpoint = firstBatch.get(1).getCheckpoint().toString();
    List<CheckpointAndChange> secondBatch = q.resume(checkpoint);
    q.start(null);
    assertTrue(0 == persistDir.listFiles().length);
    List<CheckpointAndChange> firstBatchAgain = q.resume(null);
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.