public abstract class CompoundDirectory extends Directory
Directory
that consists of a view over a compound file.CompoundFormat
Modifier | Constructor and Description |
---|---|
protected |
CompoundDirectory()
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
checkIntegrity()
Checks consistency of this directory.
|
IndexOutput |
name,
IOContext context)
Creates a new, empty file in the directory and returns an
IndexOutput
instance for appending data to this file. |
IndexOutput |
prefix,
suffix,
IOContext context)
Creates a new, empty, temporary file in the directory and returns an
IndexOutput
instance for appending data to this file. |
void |
name)
Not implemented
|
Lock |
name)
Acquires and returns a
Lock for a file with the given name. |
void |
from,
to)
Not implemented
|
void |
<> names)
Ensures that any writes to these files are moved to
stable storage (made durable).
|
void |
syncMetaData()
Ensures that directory metadata, such as recent file renames, are moved to stable
storage.
|
close, copyFrom, ensureOpen, fileLength, getPendingDeletions, getTempFileName, listAll, openChecksumInput, openInput, toString
public abstract void checkIntegrity() throws
Note that this may be costly in terms of I/O, e.g. may involve computing a checksum value against large data files.
public final void deleteFile( name)
deleteFile
in class Directory
name
- the name of an existing file.
- always: not supported by CFSpublic final void rename( from, to)
public final void syncMetaData()
Directory
syncMetaData
in class Directory
Directory.sync(Collection)
public final name, IOContext context) throws
Directory
IndexOutput
instance for appending data to this file.
This method must throw if the file
already exists.createOutput
in class Directory
name
- the name of the file to create.
- in case of I/O errorpublic final prefix, suffix, IOContext context) throws
Directory
IndexOutput
instance for appending data to this file.
The temporary file name (accessible via IndexOutput.getName()
) will start with
prefix
, end with suffix
and have a reserved file extension .tmp
.createTempOutput
in class Directory
public final void sync(<> names)
Directory
sync
in class Directory
Directory.syncMetaData()
public final name)
Directory
Lock
for a file with the given name.obtainLock
in class Directory
name
- the name of the lock fileCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.