lucene/directory-provider/src/test/java/org/infinispan/hibernate/search/sharedIndex/SharedIndexTest.java
/**
    * Counts the number of nodes in the cluster on this node
    *
    * @param node the FullTextSessionBuilder representing the current node
    * @return
    */
Counts the number of nodes in the cluster on this node
@param node the FullTextSessionBuilder representing the current node
@return
Counts the number of nodes in the cluster on this node @param node the FullTextSessionBuilder representing the current node @return
protected int clusterSize(FullTextSessionBuilder node, Class<?> entityType) {
      SearchIntegrator integrator = node.getSearchFactory().unwrap(SearchIntegrator.class);
      EntityIndexBinding indexBinding = integrator.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();
   }
protected int clusterSize ( FullTextSessionBuilder node , Class < ? > entityType ) { SearchIntegrator integrator = node . getSearchFactory ( ) . unwrap ( SearchIntegrator . class ) ; EntityIndexBinding indexBinding = integrator . 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 ( ) ; }
Counts the number of nodes in the cluster on this node
 @param node the FullTextSessionBuilder representing the current node
 @return
Counts the number of nodes in the cluster on this node @param node the FullTextSessionBuilder representing the current node @return