|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.h2.test.TestBase
org.h2.test.unit.TestFile
public class TestFile
Tests the in-memory file system.
| Field Summary |
|---|
| Fields inherited from class org.h2.test.TestBase |
|---|
BASE_TEST_DIR, config, start, TEMP_DIR, uniqueId |
| Constructor Summary | |
|---|---|
TestFile()
|
|
| Method Summary | |
|---|---|
void |
checkPowerOff()
Check if the simulated power failure occurred. |
void |
checkWritingAllowed()
Check if writing is allowed. |
java.lang.String |
getDatabasePath()
Get the database path. |
java.lang.String |
getLobCompressionAlgorithm(int type)
Get the compression algorithm used for large objects. |
java.sql.Connection |
getLobConnection()
Get a database connection to be used for LOB access. |
SmallLRUCache<java.lang.String,java.lang.String[]> |
getLobFileListCache()
Get the lob file list cache if it is used. |
LobStorage |
getLobStorage()
Get the lob storage mechanism to use. |
java.lang.Object |
getLobSyncObject()
Get the synchronization object for lob operations. |
int |
getMaxLengthInplaceLob()
Get the maximum length of a in-place large object |
TempFileDeleter |
getTempFileDeleter()
Get the temp file deleter mechanism. |
static void |
main(java.lang.String... a)
Run just this test. |
FileStore |
openFile(java.lang.String name,
java.lang.String mode,
boolean mustExist)
Open a file at the given location. |
int |
readLob(long lobId,
long offset,
byte[] buff,
int off,
int length)
Read from a lob. |
void |
test()
This method will be called by the test framework. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TestFile()
| Method Detail |
|---|
public static void main(java.lang.String... a)
throws java.lang.Exception
a - ignored
java.lang.Exception
public void test()
throws java.lang.Exception
TestBase
test in class TestBasejava.lang.Exception - if an exception in the test occurspublic void checkPowerOff()
DataHandler
checkPowerOff in interface DataHandlerpublic void checkWritingAllowed()
DataHandler
checkWritingAllowed in interface DataHandlerpublic java.lang.String getDatabasePath()
DataHandler
getDatabasePath in interface DataHandlerpublic java.lang.String getLobCompressionAlgorithm(int type)
DataHandler
getLobCompressionAlgorithm in interface DataHandlertype - the data type (CLOB or BLOB)
public java.lang.Object getLobSyncObject()
DataHandler
getLobSyncObject in interface DataHandlerpublic int getMaxLengthInplaceLob()
DataHandler
getMaxLengthInplaceLob in interface DataHandler
public FileStore openFile(java.lang.String name,
java.lang.String mode,
boolean mustExist)
DataHandler
openFile in interface DataHandlername - the file namemode - the modemustExist - whether the file must already exist
public SmallLRUCache<java.lang.String,java.lang.String[]> getLobFileListCache()
DataHandler
getLobFileListCache in interface DataHandlerpublic TempFileDeleter getTempFileDeleter()
DataHandler
getTempFileDeleter in interface DataHandlerpublic LobStorage getLobStorage()
DataHandler
getLobStorage in interface DataHandlerpublic java.sql.Connection getLobConnection()
DataHandler
getLobConnection in interface DataHandler
public int readLob(long lobId,
long offset,
byte[] buff,
int off,
int length)
DataHandler
readLob in interface DataHandlerlobId - the loboffset - the offset within the lobbuff - the target bufferoff - the offset within the target bufferlength - the number of bytes to read
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||