org.apache.derby.impl.io
Class DirStorageFactory4
java.lang.Object
org.apache.derby.impl.io.BaseStorageFactory
org.apache.derby.impl.io.DirStorageFactory
org.apache.derby.impl.io.DirStorageFactory4
- All Implemented Interfaces:
- StorageFactory, WritableStorageFactory
- public class DirStorageFactory4
- extends DirStorageFactory
This class implements the WritableStorageFactory interface using features found in Java 1.4 but
not in earlier versions of Java.
Field Summary |
private static boolean |
rwsOK
|
Constructor Summary |
DirStorageFactory4()
Most of the initialization is done in the init method. |
Method Summary |
(package private) StorageFile |
newPersistentFile(StorageFile directoryName,
java.lang.String fileName)
Construct a persistent StorageFile from a directory and path name. |
(package private) StorageFile |
newPersistentFile(java.lang.String path)
Construct a persistent StorageFile from a path name. |
(package private) StorageFile |
newPersistentFile(java.lang.String directoryName,
java.lang.String fileName)
Construct a persistent StorageFile from a directory and path name. |
boolean |
supportsRws()
This method tests whether the "rws" and "rwd" modes are implemented. |
Methods inherited from class org.apache.derby.impl.io.DirStorageFactory |
createTempDir, doInit, getCanonicalName, getSeparator, getStorageFactoryVersion, getTempDir, init, isFast, isReadOnlyDatabase, newStorageFile, newStorageFile, newStorageFile, shutdown, supportsRandomAccess, sync |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
rwsOK
private static final boolean rwsOK
DirStorageFactory4
public DirStorageFactory4()
- Most of the initialization is done in the init method.
newPersistentFile
StorageFile newPersistentFile(java.lang.String path)
- Construct a persistent StorageFile from a path name.
- Overrides:
newPersistentFile
in class DirStorageFactory
- Parameters:
path
- The path name of the file. Guaranteed not to be in the temporary file directory. If null
then the database directory should be returned.
- Returns:
- A corresponding StorageFile object
newPersistentFile
StorageFile newPersistentFile(java.lang.String directoryName,
java.lang.String fileName)
- Construct a persistent StorageFile from a directory and path name.
- Overrides:
newPersistentFile
in class DirStorageFactory
- Parameters:
fileName
- The name of the file within the directory. Guaranteed not to be null.
- Returns:
- A corresponding StorageFile object
newPersistentFile
StorageFile newPersistentFile(StorageFile directoryName,
java.lang.String fileName)
- Construct a persistent StorageFile from a directory and path name.
- Overrides:
newPersistentFile
in class DirStorageFactory
- Parameters:
fileName
- The name of the file within the directory. Guaranteed not to be null.
- Returns:
- A corresponding StorageFile object
supportsRws
public boolean supportsRws()
- 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.
- Specified by:
supportsRws
in interface WritableStorageFactory
- Overrides:
supportsRws
in class DirStorageFactory
- Returns:
- true if an StIRandomAccess file opened with "rws" or "rwd" modes immediately writes data to the
underlying storage, false if not.
Apache Derby V10.1 Engine Documentation - Copyright © 1997,2005 The Apache Software Foundation or its licensors, as applicable.