org.apache.derby.impl.io
Class DirStorageFactory4

java.lang.Object
  extended by org.apache.derby.impl.io.BaseStorageFactory
      extended by org.apache.derby.impl.io.DirStorageFactory
          extended by 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
           
 
Fields inherited from class org.apache.derby.impl.io.BaseStorageFactory
canonicalName, dataDirectory, home, separatedDataDirectory, tempDir, tempDirPath, uniqueName
 
Fields inherited from interface org.apache.derby.io.StorageFactory
VERSION_NUMBER
 
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 supportsWriteSync()
          This method tests whether the "rws" and "rwd" modes are implemented.
 
Methods inherited from class org.apache.derby.impl.io.DirStorageFactory
doInit, isReadOnlyDatabase, newStorageFile, newStorageFile, newStorageFile, supportsRandomAccess, sync
 
Methods inherited from class org.apache.derby.impl.io.BaseStorageFactory
createTempDir, createTemporaryFile, getCanonicalName, getSeparator, getStorageFactoryVersion, getTempDir, init, isFast, shutdown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.derby.io.StorageFactory
createTemporaryFile, getCanonicalName, getSeparator, getStorageFactoryVersion, getTempDir, init, isFast, shutdown
 

Field Detail

rwsOK

private static final boolean rwsOK
Constructor Detail

DirStorageFactory4

public DirStorageFactory4()
Most of the initialization is done in the init method.

Method Detail

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:
directoryName - The path name of the directory. Guaranteed not to be in the temporary file directory. Guaranteed not to be null
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:
directoryName - The path name of the directory. Guaranteed not to be to be null. Guaranteed to be created by a call to one of the newPersistentFile methods.
fileName - The name of the file within the directory. Guaranteed not to be null.
Returns:
A corresponding StorageFile object

supportsWriteSync

public boolean supportsWriteSync()
This method tests whether the "rws" and "rwd" modes are implemented. If the "rws" and "rwd" modes are supported then the database engine will conclude that the write methods of "rws"/"rwd" mode StorageRandomAccessFiles are slow but the sync method is fast and optimize accordingly.

Specified by:
supportsWriteSync in interface WritableStorageFactory
Overrides:
supportsWriteSync 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.

Built on Thu 2010-12-23 20:49:13+0000, from revision ???

Apache Derby V10.6 Internals - Copyright © 2004,2007 The Apache Software Foundation. All Rights Reserved.