|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.store.fs.FilePath
org.h2.store.fs.FilePathWrapper
org.h2.test.utils.FilePathReorderWrites
public class FilePathReorderWrites
An unstable file system. It is used to simulate file system problems (for example out of disk space).
| Field Summary |
|---|
| Fields inherited from class org.h2.store.fs.FilePath |
|---|
name |
| Constructor Summary | |
|---|---|
FilePathReorderWrites()
|
|
| Method Summary | |
|---|---|
long |
getMaxAge()
|
int |
getPowerOffCountdown()
|
java.lang.String |
getScheme()
Get the scheme (prefix) for this file provider. |
java.nio.channels.FileChannel |
open(java.lang.String mode)
Open a random access file object. |
static FilePathReorderWrites |
register()
Register the file system. |
void |
setPartialWrites(boolean partialWrites)
Whether partial writes are possible (writing only part of the data). |
void |
setPowerOffCountdown(int count,
int seed)
Set the number of write operations before a simulated power failure, and the random seed (for partial writes). |
| Methods inherited from class org.h2.store.fs.FilePathWrapper |
|---|
canWrite, createDirectory, createFile, createTempFile, delete, exists, getBase, getParent, getPath, getPrefix, isAbsolute, isDirectory, lastModified, moveTo, newDirectoryStream, newInputStream, newOutputStream, setReadOnly, size, toRealPath, unwrap, unwrap, wrap |
| Methods inherited from class org.h2.store.fs.FilePath |
|---|
get, getName, getNextTempFileNamePart, register, toString, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FilePathReorderWrites()
| Method Detail |
|---|
public static FilePathReorderWrites register()
public void setPowerOffCountdown(int count,
int seed)
count - the number of write operations (0 to never fail,
Integer.MAX_VALUE to count the operations)seed - the new seedpublic int getPowerOffCountdown()
public void setPartialWrites(boolean partialWrites)
partialWrites - true to enable
public java.nio.channels.FileChannel open(java.lang.String mode)
throws java.io.IOException
FilePath
open in class FilePathWrappermode - the access mode. Supported are r, rw, rws, rwd
java.io.IOExceptionpublic java.lang.String getScheme()
FilePathjava.nio.file.spi.FileSystemProvider.getScheme.
getScheme in class FilePathpublic long getMaxAge()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||