Package org.hibernate.search.infinispan.impl

Examples of org.hibernate.search.infinispan.impl.InfinispanDirectoryProvider


   }

   private void verifyUsesInfinispanDirectory(NRTIndexManager nrti, int expectedChunkSize, EmbeddedCacheManager embeddedCacheManager) throws IllegalArgumentException, IllegalAccessException, SecurityException, NoSuchFieldException {
      DirectoryProvider directoryProvider = nrti.getDirectoryProvider();
      Assert.assertTrue(directoryProvider instanceof InfinispanDirectoryProvider);
      InfinispanDirectoryProvider ispn = (InfinispanDirectoryProvider)directoryProvider;
      Directory infinispanDirectory = ispn.getDirectory();
      DirectoryExtensions extended = (DirectoryExtensions)infinispanDirectory;

      Assert.assertEquals(expectedChunkSize, extended.getChunkSize());

      Assert.assertEquals(extended.getMetadataCache().getName(), "LuceneIndexesMetadataOWR");
View Full Code Here


      //warn user we're overriding the configured DirectoryProvider - if anything different than Infinispan is selected.
      String directoryOption = cfg.getProperty("directory_provider", null);
      if (directoryOption != null && ! "infinispan".equals(directoryOption)) {
         log.ignoreDirectoryProviderProperty(indexName, directoryOption);
      }
      InfinispanDirectoryProvider infinispanDP = new InfinispanDirectoryProvider();
      infinispanDP.initialize(indexName, cfg, buildContext);
      return infinispanDP;
   }
View Full Code Here

   */
  public static int clusterSize(FullTextSessionBuilder node, Class<?> entityType) {
    SearchFactoryIntegrator searchFactory = (SearchFactoryIntegrator) node.getSearchFactory();
    EntityIndexBinding indexBinding = searchFactory.getIndexBinding( entityType );
    DirectoryBasedIndexManager indexManager = (DirectoryBasedIndexManager) indexBinding.getIndexManagers()[0];
    InfinispanDirectoryProvider directoryProvider = (InfinispanDirectoryProvider) indexManager.getDirectoryProvider();
    EmbeddedCacheManager cacheManager = directoryProvider.getCacheManager();
    List<Address> members = cacheManager.getMembers();
    return members.size();
  }
View Full Code Here

   */
  protected int clusterSize(FullTextSessionBuilder node, Class<?> entityType) {
    SearchFactoryIntegrator searchFactory = (SearchFactoryIntegrator) node.getSearchFactory();
    EntityIndexBinding indexBinding = searchFactory.getIndexBinding( Toaster.class );
    DirectoryBasedIndexManager indexManager = (DirectoryBasedIndexManager) indexBinding.getIndexManagers()[0];
    InfinispanDirectoryProvider directoryProvider = (InfinispanDirectoryProvider) indexManager.getDirectoryProvider();
    EmbeddedCacheManager cacheManager = directoryProvider.getCacheManager();
    List<Address> members = cacheManager.getMembers();
    return members.size();
  }
View Full Code Here

      //warn user we're overriding the configured DirectoryProvider - if anything different than Infinispan is selected.
      String directoryOption = cfg.getProperty("directory_provider", null);
      if (directoryOption != null && ! "infinispan".equals(directoryOption)) {
         log.ignoreDirectoryProviderProperty(indexName, directoryOption);
      }
      InfinispanDirectoryProvider infinispanDP = new InfinispanDirectoryProvider();
      infinispanDP.initialize(indexName, cfg, buildContext);
      return infinispanDP;
   }
View Full Code Here

      //warn user we're overriding the configured DirectoryProvider - if anything different than Infinispan is selected.
      String directoryOption = cfg.getProperty("directory_provider", null);
      if (directoryOption != null && ! "infinispan".equals(directoryOption)) {
         log.ignoreDirectoryProviderProperty(indexName, directoryOption);
      }
      InfinispanDirectoryProvider infinispanDP = new InfinispanDirectoryProvider();
      infinispanDP.initialize(indexName, cfg, buildContext);
      return infinispanDP;
   }
View Full Code Here

TOP

Related Classes of org.hibernate.search.infinispan.impl.InfinispanDirectoryProvider

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.