Examples of IndexInputContext


Examples of org.infinispan.lucene.impl.IndexInputContext

      if (fileMetadata == null) {
         throw new FileNotFoundException("Error loading metadata for index file: " + fileKey);
      }
      else if (fileMetadata.getSize() <= fileMetadata.getBufferSize()) {
         //files smaller than chunkSize don't need a readLock
         IndexInputContext iic = new IndexInputContext(chunksCache, fileKey, fileMetadata, null);
         return new SingleChunkIndexInput(iic);
      }
      else {
         boolean locked = readLocks.acquireReadLock(name);
         if (!locked) {
            // safest reaction is to tell this file doesn't exist anymore.
            throw new FileNotFoundException("Error loading metadata for index file: " + fileKey);
         }
         IndexInputContext iic = new IndexInputContext(chunksCache, fileKey, fileMetadata, readLocks);
         return new InfinispanIndexInputV3(iic);
      }
   }
View Full Code Here

Examples of org.infinispan.lucene.impl.IndexInputContext

      if (fileMetadata == null) {
         throw new FileNotFoundException("Error loading metadata for index file: " + fileKey);
      }
      else if (fileMetadata.getSize() <= fileMetadata.getBufferSize()) {
         //files smaller than chunkSize don't need a readLock
         IndexInputContext iic = new IndexInputContext(chunksCache, fileKey, fileMetadata, null);
         return new SingleChunkIndexInput(iic);
      }
      else {
         boolean locked = readLocks.acquireReadLock(name);
         if (!locked) {
            // safest reaction is to tell this file doesn't exist anymore.
            throw new FileNotFoundException("Error loading metadata for index file: " + fileKey);
         }
         IndexInputContext iic = new IndexInputContext(chunksCache, fileKey, fileMetadata, readLocks);
         return new InfinispanIndexInputV3(iic);
      }
   }
View Full Code Here

Examples of org.infinispan.lucene.impl.IndexInputContext

      if (fileMetadata == null) {
         throw new FileNotFoundException("Error loading metadata for index file: " + fileKey);
      }
      else if (fileMetadata.getSize() <= fileMetadata.getBufferSize()) {
         //files smaller than chunkSize don't need a readLock
         IndexInputContext iic = new IndexInputContext(chunksCache, fileKey, fileMetadata, null);
         return new SingleChunkIndexInput(iic);
      }
      else {
         boolean locked = readLocks.acquireReadLock(name);
         if (!locked) {
            // safest reaction is to tell this file doesn't exist anymore.
            throw new FileNotFoundException("Error loading metadata for index file: " + fileKey);
         }
         IndexInputContext iic = new IndexInputContext(chunksCache, fileKey, fileMetadata, readLocks);
         return new InfinispanIndexInputV3(iic);
      }
   }
View Full Code Here

Examples of org.infinispan.lucene.impl.IndexInputContext

      if (fileMetadata == null) {
         throw new FileNotFoundException("Error loading metadata for index file: " + fileKey);
      }
      else if (fileMetadata.getSize() <= fileMetadata.getBufferSize()) {
         //files smaller than chunkSize don't need a readLock
         IndexInputContext iic = new IndexInputContext(chunksCache, fileKey, fileMetadata, null);
         return new SingleChunkIndexInput(iic);
      }
      else {
         boolean locked = readLocks.acquireReadLock(name);
         if (!locked) {
            // safest reaction is to tell this file doesn't exist anymore.
            throw new FileNotFoundException("Error loading metadata for index file: " + fileKey);
         }
         IndexInputContext iic = new IndexInputContext(chunksCache, fileKey, fileMetadata, readLocks);
         return new InfinispanIndexInputV3(iic);
      }
   }
View Full Code Here

Examples of org.infinispan.lucene.impl.IndexInputContext

      if (fileMetadata == null) {
         throw new FileNotFoundException("Error loading metadata for index file: " + fileKey);
      }
      else if (fileMetadata.getSize() <= fileMetadata.getBufferSize()) {
         //files smaller than chunkSize don't need a readLock
         IndexInputContext iic = new IndexInputContext(chunksCache, fileKey, fileMetadata, null);
         return new SingleChunkIndexInput(iic);
      }
      else {
         boolean locked = readLocks.acquireReadLock(name);
         if (!locked) {
            // safest reaction is to tell this file doesn't exist anymore.
            throw new FileNotFoundException("Error loading metadata for index file: " + fileKey);
         }
         IndexInputContext iic = new IndexInputContext(chunksCache, fileKey, fileMetadata, readLocks);
         return new InfinispanIndexInputV3(iic);
      }
   }
View Full Code Here

Examples of org.infinispan.lucene.impl.IndexInputContext

      if (fileMetadata == null) {
         throw new FileNotFoundException("Error loading metadata for index file: " + fileKey);
      }
      else if (fileMetadata.getSize() <= fileMetadata.getBufferSize()) {
         //files smaller than chunkSize don't need a readLock
         IndexInputContext iic = new IndexInputContext(chunksCache, fileKey, fileMetadata, null);
         return new SingleChunkIndexInput(iic);
      }
      else {
         boolean locked = readLocks.acquireReadLock(name);
         if (!locked) {
            // safest reaction is to tell this file doesn't exist anymore.
            throw new FileNotFoundException("Error loading metadata for index file: " + fileKey);
         }
         IndexInputContext iic = new IndexInputContext(chunksCache, fileKey, fileMetadata, readLocks);
         return new InfinispanIndexInputV3(iic);
      }
   }
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.