|
||||||||
| 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.TestValueMemory
public class TestValueMemory
Tests the memory consumption of values. Values can estimate how much memory they occupy, and this tests if this estimation is correct.
| Field Summary |
|---|
| Fields inherited from class org.h2.test.TestBase |
|---|
baseDir, config, start |
| Constructor Summary | |
|---|---|
TestValueMemory()
|
|
| Method Summary | |
|---|---|
int |
allocateObjectId(boolean needFresh,
boolean dataFile)
Get the next object id. |
void |
checkPowerOff()
Check if the simulated power failure occurred. |
void |
checkWritingAllowed()
Check if writing is allowed. |
int |
compareTypeSave(Value a,
Value b)
Compare two values. |
java.lang.String |
createTempFile()
Create a temporary file and return the file name. |
void |
freeUpDiskSpace()
Free up disk space if possible. |
int |
getChecksum(byte[] data,
int start,
int end)
Calculate the checksum for the byte array. |
java.lang.String |
getDatabasePath()
Get the database path. |
java.lang.String |
getLobCompressionAlgorithm(int type)
Get the compression algorithm used for large objects. |
SmallLRUCache<java.lang.String,java.lang.String[]> |
getLobFileListCache()
Get the lob file list cache if it is used. |
boolean |
getLobFilesInDirectories()
Checks if the lob files stored in directories. |
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. |
Trace |
getTrace()
Get the trace writer. |
void |
handleInvalidChecksum()
Called when the checksum was invalid. |
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. |
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 TestValueMemory()
| Method Detail |
|---|
public static void main(java.lang.String... a)
throws java.lang.Exception
a - ignored
java.lang.Exception
public void test()
throws java.sql.SQLException
TestBase
test in class TestBasejava.sql.SQLException
public int allocateObjectId(boolean needFresh,
boolean dataFile)
DataHandler
allocateObjectId in interface DataHandlerneedFresh - if a fresh id is requireddataFile - true if the id is for the data file
public void checkPowerOff()
DataHandler
checkPowerOff in interface DataHandlerpublic void checkWritingAllowed()
DataHandler
checkWritingAllowed in interface DataHandler
public int compareTypeSave(Value a,
Value b)
DataHandler
compareTypeSave in interface DataHandlera - the first valueb - the second value
public java.lang.String createTempFile()
throws java.sql.SQLException
DataHandler
createTempFile in interface DataHandlerjava.sql.SQLExceptionpublic void freeUpDiskSpace()
DataHandler
freeUpDiskSpace in interface DataHandler
public int getChecksum(byte[] data,
int start,
int end)
DataHandler
getChecksum in interface DataHandlerdata - the byte arraystart - the starting offsetend - the end offset
public 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 DataHandlerpublic void handleInvalidChecksum()
DataHandler
handleInvalidChecksum in interface DataHandler
public FileStore openFile(java.lang.String name,
java.lang.String mode,
boolean mustExist)
throws java.sql.SQLException
DataHandler
openFile in interface DataHandlername - the file namemode - the modemustExist - whether the file must already exist
java.sql.SQLExceptionpublic boolean getLobFilesInDirectories()
DataHandler
getLobFilesInDirectories in interface DataHandlerpublic SmallLRUCache<java.lang.String,java.lang.String[]> getLobFileListCache()
DataHandler
getLobFileListCache in interface DataHandlerpublic TempFileDeleter getTempFileDeleter()
DataHandler
getTempFileDeleter in interface DataHandlerpublic Trace getTrace()
DataHandler
getTrace in interface DataHandler
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||