Examples of startTraversal()


Examples of com.google.enterprise.connector.spi.TraversalManager.startTraversal()

    conn.setIncludedLocationNodes(getStartNodes());

    TraversalManager mgr = sess.getTraversalManager();
    mgr.setBatchHint(3000);

    DocumentList rs = mgr.startTraversal();
    processResultSet(rs);
  }

  private String getStartNodes() throws RepositoryException {
    try {
View Full Code Here

Examples of com.google.enterprise.connector.spi.TraversalManager.startTraversal()

    TraversalManager mgr = sess.getTraversalManager();
    mgr.setBatchHint(20);

    System.out.println("============ startTraversal ============");
    LivelinkDocumentList docList = (LivelinkDocumentList) mgr.startTraversal();
    while (docList != null) {
      processResultSet(docList);
      String checkpoint = docList.checkpoint();
      System.out.println("============ resumeTraversal ============");
      docList = (LivelinkDocumentList) mgr.resumeTraversal(checkpoint);
View Full Code Here

Examples of com.google.enterprise.connector.spi.TraversalManager.startTraversal()

      long before = System.currentTimeMillis();
      mgr.setBatchHint(batchHints[i]);

      int rowCount = 0;
      LivelinkDocumentList docList =
          (LivelinkDocumentList) mgr.startTraversal();
      while (docList != null) {
        rowCount += countResultSet(docList);
        String checkpoint = docList.checkpoint();
        docList = (LivelinkDocumentList) mgr.resumeTraversal(checkpoint);
      }
View Full Code Here

Examples of com.google.enterprise.connector.spi.TraversalManager.startTraversal()

    Session sessSD = connSD.login();
    TraversalManager tmSD = sessSD.getTraversalManager();

    // Look for any results that are too old
    LivelinkDocumentList results =
        (LivelinkDocumentList) tmSD.startTraversal();
    while (results != null) {
      assertNoResultsOlderThan(results, startDate);
      String checkpoint = results.checkpoint();
      results = (LivelinkDocumentList) tmSD.resumeTraversal(checkpoint);
    }
View Full Code Here

Examples of com.google.enterprise.connector.spi.TraversalManager.startTraversal()

      con.setDataSource(dbType, TestConfiguration.dbs.get(dbType));
      Session s = con.login();
      AuthenticationManager am = s.getAuthenticationManager();
      TraversalManager tm = s.getTraversalManager();
      tm.startTraversal();
     
      // four threads which will be crawling the database simultaneously
      List<TestThread> threads = new ArrayList<TestThread>();
      for (int i = 0; i < 4; ++i) {
        TestThread t = new TestThread(TestConfiguration.d1hostname,
View Full Code Here

Examples of com.google.enterprise.connector.spi.TraversalManager.startTraversal()

  @Override
  public void run() {
    try {
      TraversalManager tm = con.login().getTraversalManager();
      tm.startTraversal();
      for (int i = 1; i < runs; ++i) {
        tm.startTraversal();
      }
    } catch (RepositoryException e) {
      throw new RuntimeException(e);
View Full Code Here

Examples of com.google.enterprise.connector.spi.TraversalManager.startTraversal()

  public void run() {
    try {
      TraversalManager tm = con.login().getTraversalManager();
      tm.startTraversal();
      for (int i = 1; i < runs; ++i) {
        tm.startTraversal();
      }
    } catch (RepositoryException e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here

Examples of com.google.enterprise.connector.spi.TraversalManager.startTraversal()

  @Test
  public void testResumeTraversal() throws RepositoryException {
    TraversalManager trav = session.getTraversalManager();
    trav.setBatchHint(500);
    DocumentList docList = trav.startTraversal();
    assertNotNull(docList);
    docList = trav.resumeTraversal("");
    assertNotNull(docList);
  }
View Full Code Here

Examples of com.google.enterprise.connector.spi.TraversalManager.startTraversal()

        "MockRepositoryEventLog1.txt");
    MockRepository r = new MockRepository(mrel);
    QueryManager qm = new MockJcrQueryManager(r.getStore());
    TraversalManager qtm = new JcrTraversalManager(qm);
    MockPusher pusher = new MockPusher(System.out);
    DocumentList documentList = qtm.startTraversal();
    int counter = 0;
    Document document = null;
    while ((document = documentList.nextDocument()) != null) {
      pusher.take(document);
      counter++;
View Full Code Here

Examples of com.google.enterprise.connector.spi.TraversalManager.startTraversal()

        new MockRepositoryEventList("MockRepositoryEventLog1.txt");
    MockRepository r = new MockRepository(mrel);
    QueryManager qm = new MockJcrQueryManager(r.getStore());
    TraversalManager qtm = new JcrTraversalManager(qm);
    {
      DocumentList documentList = qtm.startTraversal();
      int counter = countDocuments(documentList);
      Assert.assertEquals(4, counter);
    }
  }
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.