|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
K - The key (the address in an IRawStore)V - The value (typically an IDataRecordAccess
implementation).public static interface IGlobalLRU.ILRUCache<K,V>
Interface for cache of read-only records from a specific
IRawStore backed by a shared LRU.
| Method Summary | |
|---|---|
void |
clear()
Removes all entries from the cache and the backing LRU. |
V |
get(K k)
Return the object under the key from the cache or null
if there is no entry in the cache for that key. |
IAddressManager |
getAddressManager()
An IAddressManager which can be used to decode the byte count
of a record on the disk given the long address of that
record. |
UUID |
getStoreUUID()
The UUID of the associated store. |
V |
putIfAbsent(K k,
V v)
Insert or "touch" this object in the cache. |
V |
remove(K k)
Remove the object under the key from the cache. |
int |
size()
Return the #of entries in the cache. |
| Method Detail |
|---|
UUID getStoreUUID()
UUID of the associated store.
IAddressManager getAddressManager()
IAddressManager which can be used to decode the byte count
of a record on the disk given the long address of that
record. This MUST NOT cause the corresponding IRawStore
reference to be maintained as that would prevent many
IRawStore from being closed by their finalizer.
V putIfAbsent(K k,
V v)
Note: For a IWORM store, the address is always new so there
will not be an entry in the cache for that address.
Note: For a IRW store, the addresses can be reused and the delete of the old address MUST have cleared the entry for that address from the store's cache.
k - The key.v - The value.
null iff
this given object was inserted into the cache.
IllegalStateException - If a different object is in the cache under the
specified object identifier.V get(K k)
null
if there is no entry in the cache for that key.
k - The key.
null iff it is not in cache.V remove(K k)
k - The key.
null if
there was no entry for that key.void clear()
int size()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||