Package org.hibernate.search.engine.service.spi

Examples of org.hibernate.search.engine.service.spi.ServiceManager


  }

  private ShardIdentifierProvider createShardIdentifierProvider(WorkerBuildContext buildContext, Properties indexProperty) {
    ShardIdentifierProvider shardIdentifierProvider;
    String shardIdentityProviderName = indexProperty.getProperty( SHARDING_STRATEGY );
    ServiceManager serviceManager = buildContext.getServiceManager();
    shardIdentifierProvider = ClassLoaderHelper.instanceFromName(
        ShardIdentifierProvider.class,
        shardIdentityProviderName,
        "ShardIdentifierProvider",
        serviceManager
View Full Code Here


    String defaultSimilarityClassName = searchConfiguration.getProperty( Environment.SIMILARITY_CLASS );
    if ( StringHelper.isEmpty( defaultSimilarityClassName ) ) {
      return DEFAULT_SIMILARITY;
    }
    else {
      ServiceManager serviceManager = buildContext.getServiceManager();
      return ClassLoaderHelper.instanceFromName(
          Similarity.class,
          defaultSimilarityClassName,
          "default similarity",
          serviceManager
View Full Code Here

  private Similarity getConfiguredPerIndexSimilarity(String directoryProviderName, Properties indexProperties, WorkerBuildContext buildContext) {
    Similarity configLevelSimilarity = null;
    String similarityClassName = indexProperties.getProperty( Environment.SIMILARITY_CLASS_PER_INDEX );
    if ( similarityClassName != null ) {
      ServiceManager serviceManager = buildContext.getServiceManager();
      configLevelSimilarity = ClassLoaderHelper.instanceFromName(
          Similarity.class,
          similarityClassName,
          "Similarity class for index " + directoryProviderName,
          serviceManager
View Full Code Here

        throw log.getUnableToCreateJGroupsBackendException( e );
      }
      backendQueueProcessor = createJGroupsQueueProcessor( autoNodeSelector, buildContext.getServiceManager() );
    }
    else {
      ServiceManager serviceManager = buildContext.getServiceManager();
      backendQueueProcessor = ClassLoaderHelper.instanceFromName(
          BackendQueueProcessor.class,
          backend,
          "processor",
          serviceManager
View Full Code Here

    //no queue limit
    return ConfigurationParseHelper.getIntValue( properties, Environment.WORKER_WORKQUEUE_SIZE, Integer.MAX_VALUE );
  }

  private static BackendQueueProcessor createJGroupsQueueProcessor(String selectorClass, BuildContext buildContext) {
    ServiceManager serviceManager = buildContext.getServiceManager();
    return createJGroupsQueueProcessor(
        ClassLoaderHelper.instanceFromName(
            Object.class,
            selectorClass,
            "JGroups node selector",
View Full Code Here

      else {
        shardingStrategy = new IdHashShardingStrategy();
      }
    }
    else {
      ServiceManager serviceManager = buildContext.getServiceManager();
      shardingStrategy = ClassLoaderHelper.instanceFromName(
          IndexShardingStrategy.class,
          shardingStrategyName,
          "IndexShardingStrategy",
          serviceManager
View Full Code Here

  public static DirectoryProvider<?> createDirectoryProvider(String directoryProviderName, Properties indexProps, WorkerBuildContext context) {
    String className = indexProps.getProperty( "directory_provider", "" );
    String maybeShortCut = className.toLowerCase();

    DirectoryProvider<?> provider;
    ServiceManager serviceManager = context.getServiceManager();
    //try and use the built-in shortcuts before loading the provider as a fully qualified class name
    if ( defaultProviderClasses.containsKey( maybeShortCut ) ) {
      String fullClassName = defaultProviderClasses.get( maybeShortCut );
      provider = ClassLoaderHelper.instanceFromName(
          DirectoryProvider.class,
View Full Code Here

TOP

Related Classes of org.hibernate.search.engine.service.spi.ServiceManager

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.