org.infinispan.lucene
Class InfinispanDirectory

java.lang.Object
  extended by org.apache.lucene.store.Directory
      extended by org.infinispan.lucene.InfinispanDirectory

public class InfinispanDirectory
extends org.apache.lucene.store.Directory

Implementation that uses Infinispan to store Lucene indices. Directory locking is assured with SharedLuceneLock

Since:
4.0
Author:
Lukasz Moren, Sanne Grinovero
See Also:
LuceneLockFactory

Field Summary
 
Fields inherited from class org.apache.lucene.store.Directory
lockFactory
 
Constructor Summary
InfinispanDirectory(Cache<CacheKey,Object> cache)
           
InfinispanDirectory(Cache<CacheKey,Object> cache, String indexName)
           
InfinispanDirectory(Cache<CacheKey,Object> cache, String indexName, int chunkSize)
           
InfinispanDirectory(Cache<CacheKey,Object> cache, String indexName, org.apache.lucene.store.LockFactory lf)
           
InfinispanDirectory(Cache<CacheKey,Object> cache, String indexName, org.apache.lucene.store.LockFactory lf, int chunkSize)
           
 
Method Summary
 void close()
          
 org.apache.lucene.store.IndexOutput createOutput(String name)
          
 void deleteFile(String name)
          
 boolean fileExists(String name)
          
 long fileLength(String name)
          
 long fileModified(String name)
          
 Cache<CacheKey,Object> getCache()
           
 String[] list()
          
 String[] listAll()
          new name for list() in Lucene 3.0
 org.apache.lucene.store.IndexInput openInput(String name)
          
 void renameFile(String from, String to)
          
 String toString()
           
 void touchFile(String fileName)
          
 
Methods inherited from class org.apache.lucene.store.Directory
clearLock, copy, ensureOpen, getLockFactory, getLockID, makeLock, openInput, setLockFactory, sync
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InfinispanDirectory

public InfinispanDirectory(Cache<CacheKey,Object> cache,
                           String indexName,
                           org.apache.lucene.store.LockFactory lf,
                           int chunkSize)

InfinispanDirectory

public InfinispanDirectory(Cache<CacheKey,Object> cache,
                           String indexName,
                           org.apache.lucene.store.LockFactory lf)

InfinispanDirectory

public InfinispanDirectory(Cache<CacheKey,Object> cache,
                           String indexName,
                           int chunkSize)

InfinispanDirectory

public InfinispanDirectory(Cache<CacheKey,Object> cache,
                           String indexName)

InfinispanDirectory

public InfinispanDirectory(Cache<CacheKey,Object> cache)
Method Detail

list

public String[] list()
              throws IOException

Specified by:
list in class org.apache.lucene.store.Directory
Throws:
IOException

fileExists

public boolean fileExists(String name)
                   throws IOException

Specified by:
fileExists in class org.apache.lucene.store.Directory
Throws:
IOException

fileModified

public long fileModified(String name)
                  throws IOException

Specified by:
fileModified in class org.apache.lucene.store.Directory
Throws:
IOException

touchFile

public void touchFile(String fileName)
               throws IOException

Specified by:
touchFile in class org.apache.lucene.store.Directory
Throws:
IOException

deleteFile

public void deleteFile(String name)
                throws IOException

Specified by:
deleteFile in class org.apache.lucene.store.Directory
Throws:
IOException

renameFile

public void renameFile(String from,
                       String to)
                throws IOException

Specified by:
renameFile in class org.apache.lucene.store.Directory
Throws:
IOException

fileLength

public long fileLength(String name)
                throws IOException

Specified by:
fileLength in class org.apache.lucene.store.Directory
Throws:
IOException

createOutput

public org.apache.lucene.store.IndexOutput createOutput(String name)
                                                 throws IOException

Specified by:
createOutput in class org.apache.lucene.store.Directory
Throws:
IOException

openInput

public org.apache.lucene.store.IndexInput openInput(String name)
                                             throws IOException

Specified by:
openInput in class org.apache.lucene.store.Directory
Throws:
IOException

close

public void close()
           throws IOException

Specified by:
close in class org.apache.lucene.store.Directory
Throws:
IOException

toString

public String toString()
Overrides:
toString in class Object

getCache

public Cache<CacheKey,Object> getCache()

listAll

public String[] listAll()
                 throws IOException
new name for list() in Lucene 3.0

Overrides:
listAll in class org.apache.lucene.store.Directory
Throws:
IOException

Google Analytics

Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.