Package org.apache.lucene.replicator

Examples of org.apache.lucene.replicator.PerSessionDirectoryFactory


  @Test
  public void testBasic() throws Exception {
    Replicator replicator = new HttpReplicator(host, port, ReplicationService.REPLICATION_CONTEXT + "/s1",
        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));
View Full Code Here


  @Test
  public void testBasic() throws Exception {
    Replicator replicator = new HttpReplicator(host, port, ReplicationService.REPLICATION_CONTEXT + "/s1",
        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));
View Full Code Here

    // tests the behaviour of the client when the server sends an error
    // must use BasicClientConnectionManager to test whether the client is closed correctly
    BasicHttpClientConnectionManager conMgr = new BasicHttpClientConnectionManager();
    Replicator replicator = new HttpReplicator(host, port, ReplicationService.REPLICATION_CONTEXT + "/s1", conMgr);
    ReplicationClient client = new ReplicationClient(replicator, new IndexReplicationHandler(handlerIndexDir, null),
        new PerSessionDirectoryFactory(clientWorkDir));
   
    try {
      publishRevision(5);
     
      try {
View Full Code Here

  @Test
  public void testBasic() throws Exception {
    Replicator replicator = new HttpReplicator(host, port, ReplicationService.REPLICATION_CONTEXT + "/s1",
        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));
View Full Code Here

TOP

Related Classes of org.apache.lucene.replicator.PerSessionDirectoryFactory

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.