Methods Summary |
---|
int | addRecord(byte[] data)Adds a new record into the Transaction Store
checkOpen();
return store.addRecord(data, 0, data.length);
|
private void | checkOpen()Throws a RecordStoreNotOpenException if the RecordStore
is closed.
if (!isOpen) {
throw new RecordStoreNotOpenException();
}
|
public void | closeStore()Close Transaction Store and unlocks it.
All threads waiting for Transaction Store will be unblocked
checkOpen();
try {
store.closeRecordStore();
} finally {
unlockStore();
}
|
void | deleteRecord(int recordId)Delete record from the Transaction Store.
checkOpen();
store.deleteRecord(recordId);
|
static void | deleteStore(SecurityToken token)Deletes Transaction Store
RecordStoreImpl.deleteRecordStore(token,
PAYMENT_SUITEID_NAME, PAYMENT_FILE_NAME);
|
private native void | finalize()Finalizes the store.
|
int | getNumRecords()Returns the number of records currently in the Transaction Store.
checkOpen();
return store.getNumRecords();
|
public byte[] | getRecord(int recordId)Returns a copy of the data stored in the given record.
checkOpen();
return store.getRecord(recordId);
|
int[] | getRecordIDs()Returns all of the recordId's currently in the Transaction Store.
checkOpen();
return store.getRecordIDs();
|
public int | getRecordSize(int recordId)Returns the size (in bytes) of the record.
checkOpen();
return store.getRecordSize(recordId);
|
private native void | lockStore()Waits for access to Transaction Store
|
void | setRecord(int recordId, byte[] newData)Updates content of the record in the Transaction Store
checkOpen();
store.setRecord(recordId, newData, 0, newData.length);
|
private native void | unlockStore()Unlocks Transaction Store
|