Package org.infinispan.lucene.readlocks

Examples of org.infinispan.lucene.readlocks.DistributedSegmentReadLocker


   }

   private static SegmentReadLocker makeDefaultSegmentReadLocker(Cache<?, ?> metadataCache, Cache<?, ?> chunksCache, Cache<?, ?> distLocksCache, String indexName) {
      checkNotNull(distLocksCache, "distLocksCache");
      checkNotNull(indexName, "indexName");
      return new DistributedSegmentReadLocker((Cache<Object, Integer>) distLocksCache, chunksCache, metadataCache, indexName);
   }
View Full Code Here


      dir.close();
      DirectoryIntegrityCheck.verifyDirectoryStructure(cache, INDEXNAME);
   }

   private SegmentReadLocker makeTestableReadLocker(Cache cache, String indexName) {
      return new DistributedSegmentReadLocker(cache, cache, cache, indexName, true);
   }
View Full Code Here

   @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "chunkSize must be a positive integer")
   public void testInitWithInvalidChunkSize() {
      Cache cache = cacheManager.getCache();

      InfinispanDirectory dir = new InfinispanDirectory(cache, "index", 0, new DistributedSegmentReadLocker(cache, cache, cache, "index"));
   }
View Full Code Here

   public void testInitWithConstructor1() throws Exception {
      Directory dir = null;
      try {
         Cache cache = cacheManager.getCache();

         dir = new InfinispanDirectory(cache, "index", 10, new DistributedSegmentReadLocker(cache, cache, cache, "index"));
         verifyDir(dir, "index");
      } finally {
         if (dir != null) dir.close();
      }
   }
View Full Code Here

      dir.close();
      DirectoryIntegrityCheck.verifyDirectoryStructure(cache, INDEXNAME);
   }

   private SegmentReadLocker makeTestableReadLocker(Cache cache, String indexName) {
      return new DistributedSegmentReadLocker(cache, cache, cache, indexName, true);
   }
View Full Code Here

   @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "chunkSize must be a positive integer")
   public void testInitWithInvalidChunkSize() {
      Cache cache = cacheManager.getCache();
      DirectoryBuilder.newDirectoryInstance(cache, cache, cache, "index")
         .overrideSegmentReadLocker(new DistributedSegmentReadLocker(cache, cache, cache, "index"))
         .chunkSize(0);
   }
View Full Code Here

   @Test(expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "chunkSize must be a positive integer")
   public void testInitWithInvalidChunkSize() {
      Cache cache = cacheManager.getCache();

      InfinispanDirectory dir = new InfinispanDirectory(cache, "index", 0, new DistributedSegmentReadLocker(cache, cache, cache, "index"));
   }
View Full Code Here

   public void testInitWithConstructor1() throws Exception {
      Directory dir = null;
      try {
         Cache cache = cacheManager.getCache();

         dir = new InfinispanDirectory(cache, "index", 10, new DistributedSegmentReadLocker(cache, cache, cache, "index"));
         verifyDir(dir, "index");
      } finally {
         if (dir != null) dir.close();
      }
   }
View Full Code Here

   }
  
   private static SegmentReadLocker makeDefaultSegmentReadLocker(Cache<?, ?> metadataCache, Cache<?, ?> chunksCache, Cache<?, ?> distLocksCache, String indexName) {
      checkNotNull(distLocksCache, "distLocksCache");
      checkNotNull(indexName, "indexName");
      return new DistributedSegmentReadLocker((Cache<Object, Integer>) distLocksCache, chunksCache, metadataCache, indexName);
   }
View Full Code Here

   }

   private static SegmentReadLocker makeDefaultSegmentReadLocker(Cache<?, ?> metadataCache, Cache<?, ?> chunksCache, Cache<?, ?> distLocksCache, String indexName) {
      checkNotNull(distLocksCache, "distLocksCache");
      checkNotNull(indexName, "indexName");
      return new DistributedSegmentReadLocker((Cache<Object, Integer>) distLocksCache, chunksCache, metadataCache, indexName);
   }
View Full Code Here

TOP

Related Classes of org.infinispan.lucene.readlocks.DistributedSegmentReadLocker

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.