public class RMSFastCache
extends org.tantalum.storage.FlashCache
Constructor and Description |
---|
RMSFastCache(char priority,
org.tantalum.storage.FlashCache.StartupTask startupTask) |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Delete all key and value objects from heap memory and from the phone
flash memory
|
void |
close() |
byte[] |
get(long digest)
Get the value associated with this key digest from phone flash memory
|
long[] |
getDigests()
Get a list of all digests in this cache
|
long |
getFreespace() |
java.lang.String |
getKey(long digest)
Read the associated RMS entry from the index to find the original string
from which this digest was constructed.
|
void |
put(java.lang.String key,
byte[] value)
Put new or replacement data associated with a key into the cache
|
void |
removeData(long digest)
Remove the key and value associated with a key digest from the cache
|
public RMSFastCache(char priority, org.tantalum.storage.FlashCache.StartupTask startupTask) throws org.tantalum.storage.FlashDatabaseException, javax.microedition.rms.RecordStoreNotOpenException, javax.microedition.rms.RecordStoreException, java.security.NoSuchAlgorithmException, javax.microedition.rms.InvalidRecordIDException, java.security.DigestException, java.io.UnsupportedEncodingException
org.tantalum.storage.FlashDatabaseException
javax.microedition.rms.RecordStoreNotOpenException
javax.microedition.rms.RecordStoreException
java.security.NoSuchAlgorithmException
javax.microedition.rms.InvalidRecordIDException
java.security.DigestException
java.io.UnsupportedEncodingException
public java.lang.String getKey(long digest) throws org.tantalum.storage.FlashDatabaseException
getKey
in class org.tantalum.storage.FlashCache
digest
- 16 byte cryptographic hashorg.tantalum.storage.FlashDatabaseException
java.io.UnsupportedEncodingException
public byte[] get(long digest) throws org.tantalum.storage.FlashDatabaseException
get
in class org.tantalum.storage.FlashCache
digest
- org.tantalum.storage.FlashDatabaseException
public void put(java.lang.String key, byte[] value) throws java.security.DigestException, org.tantalum.storage.FlashFullException, org.tantalum.storage.FlashDatabaseException
put
in class org.tantalum.storage.FlashCache
key
- value
- java.security.DigestException
java.io.UnsupportedEncodingException
org.tantalum.storage.FlashFullException
org.tantalum.storage.FlashDatabaseException
public void removeData(long digest) throws org.tantalum.storage.FlashDatabaseException
removeData
in class org.tantalum.storage.FlashCache
digest
- org.tantalum.storage.FlashDatabaseException
public long[] getDigests() throws org.tantalum.storage.FlashDatabaseException
getDigests
in class org.tantalum.storage.FlashCache
org.tantalum.storage.FlashDatabaseException
public void clear()
clear
in class org.tantalum.storage.FlashCache
public long getFreespace() throws org.tantalum.storage.FlashDatabaseException
getFreespace
in class org.tantalum.storage.FlashCache
org.tantalum.storage.FlashDatabaseException
public void close() throws org.tantalum.storage.FlashDatabaseException
close
in class org.tantalum.storage.FlashCache
org.tantalum.storage.FlashDatabaseException