| java.lang.Object org.apache.derby.impl.io.BaseStorageFactory org.apache.derby.impl.io.DirStorageFactory
All known Subclasses: org.apache.derby.impl.io.DirStorageFactory4,
DirStorageFactory | public class DirStorageFactory extends BaseStorageFactory implements WritableStorageFactory(Code) | | This class provides a disk based implementation of the StorageFactory interface. It is used by the
database engine to access persistent data and transaction logs under the directory (default) subsubprotocol.
|
Method Summary | |
void | doInit() | public boolean | isReadOnlyDatabase() | StorageFile | newPersistentFile(String path) Construct a persistent StorageFile from a path name.
Parameters: path - The path name of the file. | StorageFile | newPersistentFile(String directoryName, String fileName) Construct a persistent StorageFile from a directory and path name.
Parameters: directoryName - The path name of the directory. | StorageFile | newPersistentFile(StorageFile directoryName, String fileName) Construct a persistent StorageFile from a directory and path name.
Parameters: directoryName - The path name of the directory. | final public StorageFile | newStorageFile(String path) Construct a StorageFile from a path name. | final public StorageFile | newStorageFile(String directoryName, String fileName) Construct a StorageFile from a directory and file name.
Parameters: directoryName - The directory part of the path name. Parameters: fileName - The name of the file within the directory. | final public StorageFile | newStorageFile(StorageFile directoryName, String fileName) Construct a StorageFile from a directory and file name.
Parameters: directoryName - The directory part of the path name. Parameters: fileName - The name of the file within the directory. | public boolean | supportsRandomAccess() Determine whether the storage supports random access. | public boolean | supportsRws() This method tests whether the "rws" and "rwd" modes are implemented. | public void | sync(OutputStream stream, boolean metaData) Force the data of an output stream out to the underlying storage. |
isReadOnlyDatabase | public boolean isReadOnlyDatabase()(Code) | | |
newPersistentFile | StorageFile newPersistentFile(String path)(Code) | | Construct a persistent StorageFile from a path name.
Parameters: path - The path name of the file. Guaranteed not to be in the temporary file directory. If nullthen the database directory should be returned. A corresponding StorageFile object |
newPersistentFile | StorageFile newPersistentFile(String directoryName, String fileName)(Code) | | Construct a persistent StorageFile from a directory and path name.
Parameters: directoryName - The path name of the directory. Guaranteed not to be in the temporary file directory.Guaranteed not to be null Parameters: fileName - The name of the file within the directory. Guaranteed not to be null. A corresponding StorageFile object |
newPersistentFile | StorageFile newPersistentFile(StorageFile directoryName, String fileName)(Code) | | Construct a persistent StorageFile from a directory and path name.
Parameters: directoryName - The path name of the directory. Guaranteed not to be to be null. Guaranteed to becreated by a call to one of the newPersistentFile methods. Parameters: fileName - The name of the file within the directory. Guaranteed not to be null. A corresponding StorageFile object |
newStorageFile | final public StorageFile newStorageFile(String path)(Code) | | Construct a StorageFile from a path name.
Parameters: path - The path name of the file A corresponding StorageFile object |
newStorageFile | final public StorageFile newStorageFile(String directoryName, String fileName)(Code) | | Construct a StorageFile from a directory and file name.
Parameters: directoryName - The directory part of the path name. Parameters: fileName - The name of the file within the directory. A corresponding StorageFile object |
newStorageFile | final public StorageFile newStorageFile(StorageFile directoryName, String fileName)(Code) | | Construct a StorageFile from a directory and file name.
Parameters: directoryName - The directory part of the path name. Parameters: fileName - The name of the file within the directory. A corresponding StorageFile object |
supportsRandomAccess | public boolean supportsRandomAccess()(Code) | | Determine whether the storage supports random access. If random access is not supported then
it will only be accessed using InputStreams and OutputStreams (if the database is writable).
true if the storage supports random access, false if it is writable. |
supportsRws | public boolean supportsRws()(Code) | | This method tests whether the "rws" and "rwd" modes are implemented. If the "rws" method is supported
then the database engine will conclude that the write methods of "rws" mode StorageRandomAccessFiles are
slow but the sync method is fast and optimize accordingly.
true if an StIRandomAccess file opened with "rws" or "rwd" modes immediately writes data to theunderlying storage, false if not. |
sync | public void sync(OutputStream stream, boolean metaData) throws IOException, SyncFailedException(Code) | | Force the data of an output stream out to the underlying storage. That is, ensure that
it has been made persistent. If the database is to be transient, that is, if the database
does not survive a restart, then the sync method implementation need not do anything.
Parameters: stream - The stream to be synchronized. Parameters: metaData - If true then this method must force both changes to the file'scontents and metadata to be written to storage; if false, it need only force file content changesto be written. The implementation is allowed to ignore this parameter and always force outmetadata changes. exception: IOException - if an I/O error occurs. exception: SyncFailedException - Thrown when the buffers cannot be flushed,or because the system cannot guarantee that all the buffers have beensynchronized with physical media. |
|
|