Package org.apache.lucene.replicator

Examples of org.apache.lucene.replicator.ReplicationClient.updateNow()


        getClientConnectionManager());
    ReplicationClient client = new ReplicationClient(replicator, new IndexReplicationHandler(handlerIndexDir, null),
        new PerSessionDirectoryFactory(clientWorkDir));
   
    publishRevision(1);
    client.updateNow();
    reopenReader();
    assertEquals(1, Integer.parseInt(reader.getIndexCommit().getUserData().get("ID"), 16));
   
    publishRevision(2);
    client.updateNow();
View Full Code Here


    client.updateNow();
    reopenReader();
    assertEquals(1, Integer.parseInt(reader.getIndexCommit().getUserData().get("ID"), 16));
   
    publishRevision(2);
    client.updateNow();
    reopenReader();
    assertEquals(2, Integer.parseInt(reader.getIndexCommit().getUserData().get("ID"), 16));
  }
 
}
View Full Code Here

        getClientConnectionManager());
    ReplicationClient client = new ReplicationClient(replicator, new IndexReplicationHandler(handlerIndexDir, null),
        new PerSessionDirectoryFactory(clientWorkDir));
   
    publishRevision(1);
    client.updateNow();
    reopenReader();
    assertEquals(1, Integer.parseInt(reader.getIndexCommit().getUserData().get("ID"), 16));
   
    publishRevision(2);
    client.updateNow();
View Full Code Here

    client.updateNow();
    reopenReader();
    assertEquals(1, Integer.parseInt(reader.getIndexCommit().getUserData().get("ID"), 16));
   
    publishRevision(2);
    client.updateNow();
    reopenReader();
    assertEquals(2, Integer.parseInt(reader.getIndexCommit().getUserData().get("ID"), 16));
   
    client.close();
  }
View Full Code Here

    try {
      publishRevision(5);
     
      try {
        replicationServlet.setRespondWithError(true);
        client.updateNow();
        fail("expected exception");
      } catch (Throwable t) {
        // expected
      }
     
View Full Code Here

      } catch (Throwable t) {
        // expected
      }
     
      replicationServlet.setRespondWithError(false);
      client.updateNow(); // now it should work
      reopenReader();
      assertEquals(5, Integer.parseInt(reader.getIndexCommit().getUserData().get("ID"), 16));
     
      client.close();
    } finally {
View Full Code Here

        getClientConnectionManager());
    ReplicationClient client = new ReplicationClient(replicator, new IndexReplicationHandler(handlerIndexDir, null),
        new PerSessionDirectoryFactory(clientWorkDir));
   
    publishRevision(1);
    client.updateNow();
    reopenReader();
    assertEquals(1, Integer.parseInt(reader.getIndexCommit().getUserData().get("ID"), 16));
   
    publishRevision(2);
    client.updateNow();
View Full Code Here

    client.updateNow();
    reopenReader();
    assertEquals(1, Integer.parseInt(reader.getIndexCommit().getUserData().get("ID"), 16));
   
    publishRevision(2);
    client.updateNow();
    reopenReader();
    assertEquals(2, Integer.parseInt(reader.getIndexCommit().getUserData().get("ID"), 16));
  }
 
}
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.