| java.lang.Object org.apache.derbyTesting.unitTests.store.T_Util
T_Util | public class T_Util (Code) | | |
Method Summary | |
public static String | getStringFromData(String data, int stringLen) Return a string of stringLen characters that starts with data
and is padded with nulls. | public static Properties | setEncryptionParam(Properties startParams) Add in encryption parameters to the startParam if "testDataEncryption"
is set to a non-null string. | public void | setOpenMode(int newMode) | public void | t_abort(Transaction t) | public void | t_abort(T_TWC ctx) | public long | t_addContainer(Transaction t, long segmentId) | public long | t_addContainer(T_TWC ctx, long segmentId) | public long | t_addContainer(Transaction t, long segmentId, int pageSize) | public long | t_addContainer(T_TWC ctx, long segmentId, int pageSize) | public long | t_addContainer(Transaction t, long segmentId, Properties tableProperties) | public long | t_addContainer(Transaction t, long segmentId, int pageSize, int spareSpace, int minimumRecordSize, boolean reusableRecordId) | public long | t_addContainer(T_TWC ctx, long segmentId, int pageSize, int spareSpace, int minimumRecordSize) | public Page | t_addPage(ContainerHandle c) Add a page to a container. | public static void | t_checkEmptyPage(Page page) Take an empty page and check it does actually seem to be empty. | public static void | t_checkFetch(Page page, RecordHandle rh, String data, int stringLen) Fetch a record that is expected to exist using a record handle. | public static void | t_checkFetch(Page page, RecordHandle rh, String data) | public void | t_checkFetch(ContainerHandle c, RecordHandle rh, String data) Fetch a record from a container that is expected to exist using a record handle. | public static void | t_checkFetch(Page page, RecordHandle rh, T_RawStoreRow row) | public static void | t_checkFetchBySlot(Page page, int slot, String data, boolean deleted, boolean forUpdate) | public static void | t_checkFetchCol(Page page, RecordHandle rh, int colNum, int numCols, String data) | public static void | t_checkFetchColFromSlot(Page page, int slot, int fieldId, DataValueDescriptor column, boolean forUpdate, String data, int stringLen) | public static void | t_checkFetchColFromSlot(Page page, int slot, int fieldId, DataValueDescriptor column, boolean forUpdate, String data) | public void | t_checkFetchDeleted(ContainerHandle c, RecordHandle rh, String data) Fetch a deleted record from a container using a record handle. | public void | t_checkFetchFail(ContainerHandle c, RecordHandle rh) | public static RecordHandle | t_checkFetchFirst(Page page, String data) | public static RecordHandle | t_checkFetchLast(Page page, String data) | public static RecordHandle | t_checkFetchNext(Page page, RecordHandle rh, String data) | public static RecordHandle | t_checkFetchPrevious(Page page, RecordHandle rh, String data) | public static void | t_checkFieldCount(Page page, int slot, int count) | public static void | t_checkInvalidSavePoint(Transaction t, String name) Negative test - check that an invalid savepoint is detected. | public void | t_checkInvalidSavePoint(T_TWC ctx, String name) | public void | t_checkNullLockCount(Transaction t) | public static void | t_checkPageNumber(Page page, long pageNumber) | public static void | t_checkRecordCount(Page page, int count, int nonDeleted) | public void | t_checkStringLengthFetch(Page page, int slot, int expectedLength) | public void | t_checkUpdateCol(Page page, RecordHandle rh, int colNum, int numCols, String data) Using sparse representation:
Update a column of a record and check resulting value. | public void | t_close(T_TWC ctx) | public void | t_commit(Transaction t) | public void | t_commit(T_TWC ctx) | public void | t_delete(ContainerHandle c, RecordHandle rh) Delete a record. | public void | t_dropContainer(Transaction t, long segmentId, long containerId) | public void | t_genRandomFile(String fileName, String mode, int size) | public Page | t_getLastPage(ContainerHandle c) Get the last page in a container. | public Page | t_getPage(ContainerHandle c, long pageNumber) Get a specific page in a container. | public static RecordHandle | t_insert(Page page, T_RawStoreRow row) Call page.insert() and ensure that the return record handle is not null. | public RecordHandle | t_insert(ContainerHandle c, T_RawStoreRow row) Insert a record on the last page, if the row doesn't fit on the
last page create a new page and insert there. | public static RecordHandle | t_insertAtSlot(Page page, int slot, T_RawStoreRow row) Call page.insert() and ensure that the return record handle is not null. | public static RecordHandle | t_insertAtSlot(Page page, int slot, T_RawStoreRow row, byte insertFlag) Call page.insert() and ensure that the return record handle is not null. | public static RecordHandle | t_insertAtSlot(Page page, int slot, T_RawStoreRow row, byte insertFlag, int overflowThreshold) Call page.insert() and ensure that the return record handle is not null. | public ContainerHandle | t_openContainer(Transaction t, long segmentId, long containerId, boolean forUpdate) Open a container. | public ContainerHandle | t_openContainer(T_TWC ctx, long segmentId, long containerId, boolean forUpdate) | public static void | t_readOnlySlotOutOfRange(Page page, int slot) | public void | t_removePage(ContainerHandle c, Page p) Remove a page from a container. | public Transaction | t_startGlobalTransaction(int format_id, byte[] global_id, byte[] branch_id) | public Transaction | t_startInternalTransaction() | public Transaction | t_startTransaction() | public T_TWC | t_startTransactionWithContext() | public void | t_update(ContainerHandle c, RecordHandle rh, T_RawStoreRow row) Update a record. | public static void | t_updateSlotOutOfRange(Page page, int slot) | public static void | t_wait(int milliSecond) |
getStringFromData | public static String getStringFromData(String data, int stringLen)(Code) | | Return a string of stringLen characters that starts with data
and is padded with nulls.
|
setEncryptionParam | public static Properties setEncryptionParam(Properties startParams)(Code) | | Add in encryption parameters to the startParam if "testDataEncryption"
is set to a non-null string.
|
setOpenMode | public void setOpenMode(int newMode)(Code) | | |
t_addContainer | public long t_addContainer(Transaction t, long segmentId, int pageSize) throws StandardException, T_Fail(Code) | | Add a new container in the transaction with a specified page size
exception: T_Fail - Unexpected behaviour from the API exception: StandardException - Unexpected exception from the implementation |
t_addContainer | public long t_addContainer(Transaction t, long segmentId, int pageSize, int spareSpace, int minimumRecordSize, boolean reusableRecordId) throws StandardException, T_Fail(Code) | | Add a new container in the transaction with specified
pageSize, spareSpace, minimumRecordSize, and reusableRecordId
exception: T_Fail - Unexpected behaviour from the API exception: StandardException - Unexpected exception from the implementation |
t_checkEmptyPage | public static void t_checkEmptyPage(Page page) throws T_Fail, StandardException(Code) | | Take an empty page and check it does actually seem to be empty.
exception: T_Fail - Unexpected behaviour from the API exception: StandardException - Unexpected exception from the implementation |
t_checkFetch | public static void t_checkFetch(Page page, RecordHandle rh, String data, int stringLen) throws T_Fail, StandardException(Code) | | Fetch a record that is expected to exist using a record handle.
The record has a T_RawStoreRow of 1 column and this column as value as
specified by data, which could be null.
Calls recordExists() before fetch to ensure that the record
is there.
Parameters: page - the page in question Parameters: rh - the record handle Parameters: data - the string value that is expected in the row exception: T_Fail - Implementation failed expectation exception: StandardException - Unexpected exception from the implementation See Also: Page.recordExists See Also: Page.fetch |
t_checkPageNumber | public static void t_checkPageNumber(Page page, long pageNumber) throws T_Fail(Code) | | |
t_checkStringLengthFetch | public void t_checkStringLengthFetch(Page page, int slot, int expectedLength) throws T_Fail, StandardException(Code) | | Check to make sure a row (possibly with overflow) is of the correct length
exception: T_Fail - Record handle returned is null. exception: StandardException - Unexpected exception from the implementation |
t_genRandomFile | public void t_genRandomFile(String fileName, String mode, int size) throws T_Fail(Code) | | Lazy people's random file generator:
Generate a random file with specified name and file size
exception: T_Fail - Record handle returned is null. |
t_wait | public static void t_wait(int milliSecond)(Code) | | Make this thread wait a bit, probably for post commit to finish
|
|
|