org.compass.needle.gigaspaces.store
Class GigaSpaceDirectory
java.lang.Object
org.apache.lucene.store.Directory
org.compass.needle.gigaspaces.store.GigaSpaceDirectory
public class GigaSpaceDirectory
- extends Directory
GigaSpace Directory is a Lucene directory built on top of GigaSpaces.
The direcotry implementation uses FileEntry
as the meta data of a file written to the Space. And one or more FileBucketEntry
to hold the entry data. Note, the bucket size can eb controlled during index creation, but if connecting
to an existing index, the bucket index must be the same.
- 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
GigaSpaceDirectory
public GigaSpaceDirectory(org.openspaces.core.GigaSpace gigaSpace,
String indexName)
GigaSpaceDirectory
public GigaSpaceDirectory(com.j_spaces.core.IJSpace space,
String indexName)
GigaSpaceDirectory
public GigaSpaceDirectory(com.j_spaces.core.IJSpace space,
String indexName,
int bucketSize)
GigaSpaceDirectory
public GigaSpaceDirectory(com.j_spaces.core.IJSpace space,
String indexName,
int bucketSize,
int flushRate)
deleteContent
public void deleteContent()
throws IOException
- Throws:
IOException
getOnGoingIndexOutputs
Map<String,IndexOutput> getOnGoingIndexOutputs()
getSpace
public com.j_spaces.core.IJSpace getSpace()
getIndexName
String getIndexName()
getBucketSize
int getBucketSize()
getFlushRate
int getFlushRate()
deleteFile
public void deleteFile(String fileName)
throws IOException
- Specified by:
deleteFile in class Directory
- Throws:
IOException
fileExists
public boolean fileExists(String fileName)
throws IOException
- Specified by:
fileExists in class Directory
- Throws:
IOException
fileLength
public long fileLength(String fileName)
throws IOException
- Specified by:
fileLength in class Directory
- Throws:
IOException
fileModified
public long fileModified(String fileName)
throws IOException
- Specified by:
fileModified in class Directory
- Throws:
IOException
list
public String[] list()
throws IOException
- Specified by:
list in class Directory
- Throws:
IOException
renameFile
public void renameFile(String from,
String to)
throws IOException
- Specified by:
renameFile in class Directory
- Throws:
IOException
touchFile
public void touchFile(String fileName)
throws IOException
- Specified by:
touchFile in class Directory
- Throws:
IOException
openInput
public IndexInput openInput(String fileName)
throws IOException
- Specified by:
openInput in class Directory
- Throws:
IOException
createOutput
public IndexOutput createOutput(String fileName)
throws IOException
- Specified by:
createOutput in class Directory
- Throws:
IOException
close
public void close()
throws IOException
- Does nothing since an already constructed Space is passes to this
directory.
- Specified by:
close in class Directory
- Throws:
IOException
Copyright (c) 2004-2008 The Compass Project.