public class OakDirectory
extends Directory
Directory (a flat list of files)
based on an Oak NodeBuilder.| Modifier and Type | Class and Description |
|---|---|
static interface |
OakDirectory.BlobFactory |
static class |
OakDirectory.BlobStoreBlobFactory |
static class |
OakDirectory.NodeBuilderBlobFactory |
| Constructor and Description |
|---|
OakDirectory(NodeBuilder builder,
IndexDefinition definition,
boolean readOnly) |
OakDirectory(NodeBuilder builder,
String dataNodeName,
IndexDefinition definition,
boolean readOnly) |
OakDirectory(NodeBuilder builder,
String dataNodeName,
IndexDefinition definition,
boolean readOnly,
GarbageCollectableBlobStore blobStore) |
OakDirectory(NodeBuilder builder,
String dataNodeName,
IndexDefinition definition,
boolean readOnly,
OakDirectory.BlobFactory blobFactory) |
| 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. |
IndexOutput |
createOutput(String name,
IOContext context) |
void |
deleteFile(String name) |
boolean |
fileExists(String name) |
long |
fileLength(String name) |
LockFactory |
getLockFactory() |
boolean |
isDirty() |
String[] |
listAll() |
Lock |
makeLock(String name) |
IndexInput |
openInput(String name,
IOContext context) |
void |
setLockFactory(LockFactory lockFactory) |
void |
sync(Collection<String> names) |
String |
toString() |
public OakDirectory(NodeBuilder builder, IndexDefinition definition, boolean readOnly)
public OakDirectory(NodeBuilder builder, String dataNodeName, IndexDefinition definition, boolean readOnly)
public OakDirectory(NodeBuilder builder, String dataNodeName, IndexDefinition definition, boolean readOnly, GarbageCollectableBlobStore blobStore)
public OakDirectory(NodeBuilder builder, String dataNodeName, IndexDefinition definition, boolean readOnly, OakDirectory.BlobFactory blobFactory)
public String[] listAll() throws IOException
IOExceptionpublic boolean fileExists(String name) throws IOException
IOExceptionpublic void deleteFile(String name) throws IOException
IOExceptionpublic long fileLength(String name) throws IOException
IOExceptionpublic IndexOutput createOutput(String name, IOContext context) throws IOException
IOExceptionpublic IndexInput openInput(String name, IOContext context) throws IOException
IOExceptionpublic Lock makeLock(String name)
public void clearLock(String name) throws IOException
IOExceptionpublic void sync(Collection<String> names) throws IOException
IOExceptionpublic void close()
throws IOException
IOExceptionpublic void setLockFactory(LockFactory lockFactory)
throws IOException
IOExceptionpublic LockFactory getLockFactory()
public String toString()
public 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 OakDirectory.BlobFactory as this directory.public boolean isDirty()
"Copyright © 2010 - 2017 Adobe Systems Incorporated. All Rights Reserved"