public class OakDirectory
extends org.apache.lucene.store.Directory
Directory (a flat list of files)
based on an Oak NodeBuilder.| Modifier and Type | Field and Description |
|---|---|
protected org.apache.jackrabbit.oak.spi.state.NodeBuilder |
builder |
protected String |
dataNodeName |
protected org.apache.jackrabbit.oak.spi.state.NodeBuilder |
directoryBuilder |
static String |
PROP_DIR_LISTING |
static String |
PROP_UNSAFE_FOR_ACTIVE_DELETION |
| Modifier and Type | Method and Description |
|---|---|
void |
clearLock(String name) |
void |
close() |
void |
copy(OakDirectory dest,
String name)
Copies the file with the given
name to the dest
directory. |
org.apache.lucene.store.IndexOutput |
createOutput(String name,
org.apache.lucene.store.IOContext context) |
void |
deleteFile(String name) |
boolean |
fileExists(String name) |
long |
fileLength(String name) |
org.apache.lucene.store.LockFactory |
getLockFactory() |
boolean |
isDirty() |
String[] |
listAll() |
org.apache.lucene.store.Lock |
makeLock(String name) |
org.apache.lucene.store.IndexInput |
openInput(String name,
org.apache.lucene.store.IOContext context) |
void |
setLockFactory(org.apache.lucene.store.LockFactory lockFactory) |
void |
sync(Collection<String> names) |
String |
toString() |
public static final String PROP_DIR_LISTING
public static final String PROP_UNSAFE_FOR_ACTIVE_DELETION
protected final org.apache.jackrabbit.oak.spi.state.NodeBuilder builder
protected final String dataNodeName
protected final org.apache.jackrabbit.oak.spi.state.NodeBuilder directoryBuilder
public OakDirectory(org.apache.jackrabbit.oak.spi.state.NodeBuilder builder, LuceneIndexDefinition definition, boolean readOnly)
public OakDirectory(org.apache.jackrabbit.oak.spi.state.NodeBuilder builder, String dataNodeName, LuceneIndexDefinition definition, boolean readOnly)
public OakDirectory(org.apache.jackrabbit.oak.spi.state.NodeBuilder builder, String dataNodeName, LuceneIndexDefinition definition, boolean readOnly, @Nullable @Nullable org.apache.jackrabbit.oak.spi.blob.GarbageCollectableBlobStore blobStore)
public OakDirectory(org.apache.jackrabbit.oak.spi.state.NodeBuilder builder, String dataNodeName, LuceneIndexDefinition definition, boolean readOnly, @Nullable @Nullable org.apache.jackrabbit.oak.spi.blob.GarbageCollectableBlobStore blobStore, @NotNull ActiveDeletedBlobCollectorFactory.BlobDeletionCallback blobDeletionCallback)
public OakDirectory(org.apache.jackrabbit.oak.spi.state.NodeBuilder builder, String dataNodeName, LuceneIndexDefinition definition, boolean readOnly, BlobFactory blobFactory)
public OakDirectory(org.apache.jackrabbit.oak.spi.state.NodeBuilder builder, String dataNodeName, LuceneIndexDefinition definition, boolean readOnly, BlobFactory blobFactory, @NotNull ActiveDeletedBlobCollectorFactory.BlobDeletionCallback blobDeletionCallback)
public OakDirectory(org.apache.jackrabbit.oak.spi.state.NodeBuilder builder, String dataNodeName, LuceneIndexDefinition definition, boolean readOnly, BlobFactory blobFactory, @NotNull ActiveDeletedBlobCollectorFactory.BlobDeletionCallback blobDeletionCallback, boolean streamingWriteEnabled)
public String[] listAll() throws IOException
listAll in class org.apache.lucene.store.DirectoryIOExceptionpublic boolean fileExists(String name) throws IOException
fileExists in class org.apache.lucene.store.DirectoryIOExceptionpublic void deleteFile(String name) throws IOException
deleteFile in class org.apache.lucene.store.DirectoryIOExceptionpublic long fileLength(String name) throws IOException
fileLength in class org.apache.lucene.store.DirectoryIOExceptionpublic org.apache.lucene.store.IndexOutput createOutput(String name, org.apache.lucene.store.IOContext context) throws IOException
createOutput in class org.apache.lucene.store.DirectoryIOExceptionpublic org.apache.lucene.store.IndexInput openInput(String name, org.apache.lucene.store.IOContext context) throws IOException
openInput in class org.apache.lucene.store.DirectoryIOExceptionpublic org.apache.lucene.store.Lock makeLock(String name)
makeLock in class org.apache.lucene.store.Directorypublic void clearLock(String name) throws IOException
clearLock in class org.apache.lucene.store.DirectoryIOExceptionpublic void sync(Collection<String> names) throws IOException
sync in class org.apache.lucene.store.DirectoryIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class org.apache.lucene.store.DirectoryIOExceptionpublic void setLockFactory(org.apache.lucene.store.LockFactory lockFactory)
throws IOException
setLockFactory in class org.apache.lucene.store.DirectoryIOExceptionpublic org.apache.lucene.store.LockFactory getLockFactory()
getLockFactory in class org.apache.lucene.store.Directorypublic String toString()
toString in class org.apache.lucene.store.Directorypublic void copy(OakDirectory dest, String name) throws IOException
name to the dest
directory. The file is copied 'by reference'. That is, the file in the
destination directory will reference the same blob values as the source
file.
This method is a no-op if the file does not exist in this directory.
dest - the destination directory.name - the name of the file to copy.IOException - if an error occurs while copying the file.IllegalArgumentException - if the destination directory does not
use the same BlobFactory as this directory.public boolean isDirty()
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.