Examples of MassIndexerFactory


Examples of org.hibernate.search.spi.MassIndexerFactory

  public MassIndexer createIndexer(Class<?>... types) {
    //We shouldn't expose the ServiceManager in phases other than startup or teardown, that's why the cast is required.
    //Exceptionally, this very specific case is fine. TODO: cleanup this mess.
    MutableSearchFactory msf = (MutableSearchFactory) getSearchFactoryImplementor();
    ServiceManager serviceManager = msf.getServiceManager();
    MassIndexerFactory service = serviceManager.requestService( MassIndexerFactoryProvider.class, null );
    return service.createMassIndexer( getSearchFactoryImplementor(), getFactory(), types );
  }
View Full Code Here

Examples of org.hibernate.search.spi.MassIndexerFactory

  public MassIndexer createIndexer(Class<?>... types) {
    //We shouldn't expose the ServiceManager in phases other than startup or teardown, that's why the cast is required.
    //Exceptionally, this very specific case is fine. TODO: cleanup this mess.
    MutableSearchFactory msf = (MutableSearchFactory) getSearchFactoryImplementor();
    ServiceManager serviceManager = msf.getServiceManager();
    MassIndexerFactory service = serviceManager.requestService( MassIndexerFactoryProvider.class, null );
    return service.createMassIndexer( getSearchFactoryImplementor(), getFactory(), types );
  }
View Full Code Here

Examples of org.hibernate.search.spi.MassIndexerFactory

    //another solution would be to subclass SessionImpl instead of having this LuceneSession delegation model
    //this is an open discussion
  }

  public MassIndexer createIndexer(Class<?>... types) {
    MassIndexerFactory factory = requestService( MassIndexerFactory.class );
    return factory.createMassIndexer( getSearchFactoryImplementor(), getSessionFactory(), types );
  }
View Full Code Here

Examples of org.hibernate.search.spi.MassIndexerFactory

  public MassIndexer createIndexer(Class<?>... types) {
    //We shouldn't expose the ServiceManager in phases other than startup or teardown, that's why the cast is required.
    //Exceptionally, this very specific case is fine. TODO: cleanup this mess.
    MutableSearchFactory msf = (MutableSearchFactory) getSearchFactoryImplementor();
    ServiceManager serviceManager = msf.getServiceManager();
    MassIndexerFactory service = serviceManager.requestService( MassIndexerFactoryProvider.class, null );
    return service.createMassIndexer( getSearchFactoryImplementor(), getFactory(), types );
  }
View Full Code Here

Examples of org.hibernate.search.spi.MassIndexerFactory

    //another solution would be to subclass SessionImpl instead of having this LuceneSession delegation model
    //this is an open discussion
  }

  public MassIndexer createIndexer(Class<?>... types) {
    MassIndexerFactory factory = requestService( MassIndexerFactory.class );
    return factory.createMassIndexer( getSearchFactoryImplementor(), getSessionFactory(), types );
  }
View Full Code Here

Examples of org.hibernate.search.spi.MassIndexerFactory

    //this is an open discussion
  }

  @Override
  public MassIndexer createIndexer(Class<?>... types) {
    MassIndexerFactory massIndexerFactory = createMassIndexerFactory();
    return massIndexerFactory.createMassIndexer( getSearchFactoryImplementor(), getFactory(), types );
  }
View Full Code Here

Examples of org.hibernate.search.spi.MassIndexerFactory

  public FullTextSharedSessionBuilder sessionWithOptions() {
    return new FullTextSharedSessionBuilderDelegator( super.sessionWithOptions() );
  }

  private MassIndexerFactory createMassIndexerFactory() {
    MassIndexerFactory factory;
    Properties properties = getSearchFactoryImplementor().getConfigurationProperties();
    String factoryClassName = properties.getProperty( MassIndexerFactory.MASS_INDEXER_FACTORY_CLASSNAME );

    if ( factoryClassName != null ) {
      factory = ClassLoaderHelper.instanceFromName(
          MassIndexerFactory.class, factoryClassName, getClass()
          .getClassLoader(), "Mass indexer factory"
      );

    }
    else {
      factory = new DefaultMassIndexerFactory();
    }
    factory.initialize( properties );
    return factory;
  }
View Full Code Here

Examples of org.hibernate.search.spi.MassIndexerFactory

  }

  @Override
  public MassIndexerFactory initiateService(Map configurationValues, ServiceRegistryImplementor registry) {
    String factoryClassName = (String) configurationValues.get( MASS_INDEXER_FACTORY_CLASSNAME );
    MassIndexerFactory factory = createFactory( factoryClassName );
    factory.initialize( properties( configurationValues ) );
    return factory;
  }
View Full Code Here

Examples of org.hibernate.search.spi.MassIndexerFactory

    //another solution would be to subclass SessionImpl instead of having this LuceneSession delegation model
    //this is an open discussion
  }

  public MassIndexer createIndexer(Class<?>... types) {
    MassIndexerFactory factory = requestService( MassIndexerFactory.class );
    return factory.createMassIndexer( getSearchFactoryImplementor(), getSessionFactory(), types );
  }
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.