| org.apache.derby.io.WritableStorageFactory
All known Subclasses: org.apache.derby.impl.io.DirStorageFactory, org.apache.derbyTesting.functionTests.util.corruptio.CorruptBaseStorageFactory,
WritableStorageFactory | public interface WritableStorageFactory extends StorageFactory(Code) | | This interface extends StorageFactory to provide read/write access to storage.
The database engine will call this interface's methods from its own privilege blocks.
Each WritableStorageFactory instance may be concurrently used by multiple threads.
|
Method Summary | |
public boolean | supportsRws() This method tests whether the StorageRandomAccessFile "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. |
supportsRws | public boolean supportsRws()(Code) | | This method tests whether the StorageRandomAccessFile "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. |
|
|