org.compass.needle.coherence
Class DataGridCoherenceDirectory
java.lang.Object
org.apache.lucene.store.Directory
org.compass.needle.coherence.CoherenceDirectory
org.compass.needle.coherence.DataGridCoherenceDirectory
- Direct Known Subclasses:
- InvocableCoherenceDirectory
public class DataGridCoherenceDirectory
- extends CoherenceDirectory
The default coherence directory allowing to store Lucene index within Coherence directory.
The implementation uses FileHeaderKey and
FileHeaderValue as the header information for a file
(such as size and timestamp), and includes one or more buckets using
FileBucketKey and FileBucketValue.
Locking is done using DefaultCoherenceLockFactory.
Note, if possible with the coherence edition, it is preferable to use InvocableCoherenceDirectory.
- Author:
- kimchy
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_BUCKET_SIZE
public static final int DEFAULT_BUCKET_SIZE
- See Also:
- Constant Field Values
DEFAULT_FLUSH_RATE
public static final int DEFAULT_FLUSH_RATE
- See Also:
- Constant Field Values
DataGridCoherenceDirectory
public DataGridCoherenceDirectory(String cacheName)
DataGridCoherenceDirectory
public DataGridCoherenceDirectory(String cacheName,
String indexName)
DataGridCoherenceDirectory
public DataGridCoherenceDirectory(String cacheName,
String indexName,
int bucketSize)
DataGridCoherenceDirectory
public DataGridCoherenceDirectory(com.tangosol.net.NamedCache cache,
String indexName)
DataGridCoherenceDirectory
public DataGridCoherenceDirectory(com.tangosol.net.NamedCache cache,
String indexName,
int bucketSize)
DataGridCoherenceDirectory
public DataGridCoherenceDirectory(com.tangosol.net.NamedCache cache,
String indexName,
int bucketSize,
int flushRate)
doInit
protected void doInit()
getIndexName
public String getIndexName()
- Specified by:
getIndexName in class CoherenceDirectory
getCache
public com.tangosol.net.NamedCache getCache()
- Specified by:
getCache in class CoherenceDirectory
getBucketSize
public int getBucketSize()
- Specified by:
getBucketSize in class CoherenceDirectory
getFlushRate
public int getFlushRate()
- Specified by:
getFlushRate in class CoherenceDirectory
getOnGoingIndexOutputs
public Map<String,IndexOutput> getOnGoingIndexOutputs()
- Specified by:
getOnGoingIndexOutputs in class CoherenceDirectory
getIndexNameKeyExtractor
public com.tangosol.util.ValueExtractor getIndexNameKeyExtractor()
getTypeKeyExtractor
public com.tangosol.util.ValueExtractor getTypeKeyExtractor()
getFileNameKeyExtractor
public com.tangosol.util.ValueExtractor getFileNameKeyExtractor()
getIndexNameEqualsFilter
public com.tangosol.util.Filter getIndexNameEqualsFilter()
fileExists
public boolean fileExists(String name)
throws IOException
- Specified by:
fileExists in class Directory
- Throws:
IOException
fileModified
public long fileModified(String name)
throws IOException
- Specified by:
fileModified in class Directory
- Throws:
IOException
touchFile
public void touchFile(String name)
throws IOException
- Specified by:
touchFile in class Directory
- Throws:
IOException
deleteFile
public void deleteFile(String name)
throws IOException
- Specified by:
deleteFile in class Directory
- Throws:
IOException
renameFile
public void renameFile(String from,
String to)
throws IOException
- Specified by:
renameFile in class Directory
- Throws:
IOException
fileLength
public long fileLength(String name)
throws IOException
- Specified by:
fileLength in class Directory
- Throws:
IOException
list
public String[] list()
throws IOException
- Specified by:
list in class Directory
- Throws:
IOException
deleteContent
public void deleteContent()
- Specified by:
deleteContent in class CoherenceDirectory
createOutput
public IndexOutput createOutput(String name)
throws IOException
- Specified by:
createOutput in class Directory
- Throws:
IOException
openInput
public IndexInput openInput(String name)
throws IOException
- Specified by:
openInput in class Directory
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close in class Directory
- Throws:
IOException
Copyright (c) 2004-2008 The Compass Project.