| java.lang.Object org.apache.derbyTesting.functionTests.util.corruptio.CorruptBaseStorageFactory org.apache.derbyTesting.functionTests.util.corruptio.CorruptDiskStorageFactory
CorruptDiskStorageFactory | public class CorruptDiskStorageFactory extends CorruptBaseStorageFactory (Code) | | This class provides proxy implementation of the StorageFactory
interface for testing.
Storage Factory is used by the database engine to access
persistent data and transaction logs. By default all the method calls
delegate the work to the real disk storage factory
(org.apache.derby.impl.io.DirStorageFactory)
based on the classes in the java.io packgs. In some cases this factory
instruments some methods to corrupt the io to simulate disk corruptions for
testing. For example to simulate out of order partial writes to disk before
the crash.
Derby by default uses the storage factory implementation in
DirStorageFactory/DirStorageFactory4 when a database is accessed with
"jdbc:derby:". This factory can be specified instead using
derby.subSubProtocol. For example:
derby.subSubProtocol.csf=org.apache.derbyTesting.functionTests.
util.corruptio.CorruptDiskStorageFactory
database need to be accessed by specifying the subporotocol name like
'jdbc:derby:csf:wombat'.
Interaction between the tests that requires instrumenting the i/o and
this factory is through the flags in CorruptibleIo class. Tests should not
call the methods in this factory directly. Database engine invokes the
methods in this factory, so they can instrumented to do whatever is
required for testing.
author: Suresh Thalamati version: 1.0 See Also: CorruptibleIo See Also: WritableStorageFactory See Also: StorageFactory |
|
|