Package org.springmodules.lucene.index.factory.concurrent

Examples of org.springmodules.lucene.index.factory.concurrent.LockIndexFactory


public class ConcurrentDefaultResourceManagerTests extends DefaultResourceManagerTests {

  protected IndexFactory createIndexFactory(RAMDirectory directory) throws Exception {
    IndexFactory targetIndexFactory = super.createIndexFactory(directory);
    LockIndexFactory indexFactory = new LockIndexFactory();
    indexFactory.setTargetIndexFactory(targetIndexFactory);
    indexFactory.afterPropertiesSet();
    return indexFactory;
  }
View Full Code Here


    SimpleIndexFactory indexFactory2 = (SimpleIndexFactory)context.getBean("target-fsDirectory2");
    assertNotNull(indexFactory2);
    assertSame(directory2, indexFactory2.getDirectory());
    assertSame(analyzer, indexFactory2.getAnalyzer());

    LockIndexFactory channelIndexFactory2 = (LockIndexFactory)context.getBean("fsDirectory2");
    assertNotNull(channelIndexFactory2);
    assertSame(indexFactory2, channelIndexFactory2.getTargetIndexFactory());

    //Directories 3 & 4
    /*FSDirectory directory3 = (FSDirectory)context.getBean("fsDirectory-fsDirectory3");
    assertNotNull(directory3);
    assertNotNull(directory3.getFile());

    SimpleIndexFactory indexFactory3 = (SimpleIndexFactory)context.getBean("target-fsDirectory3");
    assertNotNull(indexFactory3);
    assertNotNull(indexFactory3.getDirectory());
    assertSame(directory3, indexFactory3.getDirectory());
    assertNotNull(indexFactory3.getAnalyzer());
    assertNotSame(analyzer, indexFactory3.getAnalyzer());

    ChannelIndexFactory channelIndexFactory3 = (ChannelIndexFactory)context.getBean("fsDirectory3");
    assertNotNull(channelIndexFactory3);
    assertSame(indexFactory3, channelIndexFactory3.getTargetIndexFactory());*/

    FSDirectory directory4 = (FSDirectory)context.getBean("fsDirectory-fsDirectory4");
    assertNotNull(directory4);
    assertNotNull(directory4.getFile());

    SimpleIndexFactory indexFactory4 = (SimpleIndexFactory)context.getBean("target-fsDirectory4");
    assertNotNull(indexFactory4);
    assertNotNull(indexFactory4.getDirectory());
    assertSame(directory4, indexFactory4.getDirectory());
    assertNotNull(indexFactory4.getAnalyzer());
    assertNotSame(analyzer, indexFactory4.getAnalyzer());

    LockIndexFactory channelIndexFactory4 = (LockIndexFactory)context.getBean("fsDirectory4");
    assertNotNull(channelIndexFactory4);
    assertSame(indexFactory4, channelIndexFactory4.getTargetIndexFactory());
  }
View Full Code Here

TOP

Related Classes of org.springmodules.lucene.index.factory.concurrent.LockIndexFactory

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.