![]() |
Quadcap Embeddable Database |
Inheritance diagram for com.quadcap.sql.file.Cacheable:

They are initialized using the
Definition at line 51 of file Cacheable.java.
Public Member Functions | |
| void | init (Object store, long key) throws IOException |
| Initialization and (recycling). | |
| Object | getStore () |
| Return the cache to which this cacheable belongs. | |
| boolean | isReadOnly () |
| Am I read only? | |
| void | setReadOnly (boolean v) |
| Set the 'read only' flag. | |
| final boolean | isDirty () |
| Read the dirty bit. | |
| void | setDirty (boolean d) |
| Set the dirty bit. | |
| final int | getRefCount () |
| Read the reference count. | |
| final void | setRefCount (int x) |
| Set the reference count. | |
| final void | incrRefCount () |
| Increment the reference count. | |
| final void | decrRefCount () |
| Decrement the reference count. | |
| final void | setDListItem (DListItem d) |
| Set the LRU back pointer. | |
| final DListItem | getDListItem () |
| Get the LRU back pointer. | |
| long | getKey () |
| Get the cache item's key. | |
| void | setKey (long key) |
| Set the cache item's key. | |
| abstract Object | getData () |
| Get the cache item's data. | |
| abstract void | setData (Object data) |
| Set the cache item's data. | |
| void | flush () throws IOException |
| Flush this item and clear the dirty bit. | |
Protected Attributes | |
| long | key |
| The key used to locate this item in the underlying store, as well as in the cache itself. | |
| Object | store |
Package Attributes | |
| boolean | dirty = false |
| has object been modified while in the cache? | |
| boolean | readOnly = false |
| Is this cache item read only? | |
| int | refCount = 0 |
| We reference-count the cache items to know when it's ok to flush older items to make room for new ones. | |
| DListItem | me |
| Back pointer to my place in the LRU list. | |
|
|
|
Flush this item and clear the dirty bit.
Reimplemented in com.quadcap.sql.file.Block. Definition at line 171 of file Cacheable.java. References com.quadcap.sql.file.Cacheable.dirty. Referenced by com.quadcap.sql.file.Cache.flush(), and com.quadcap.sql.file.Cache.getCacheable(). |
|
|
Get the cache item's data.
Implemented in com.quadcap.sql.file.Block. Referenced by com.quadcap.sql.file.Cache.get(). |
|
|
Get the LRU back pointer.
Definition at line 146 of file Cacheable.java. References com.quadcap.sql.file.Cacheable.me. Referenced by com.quadcap.sql.file.Cache.getCacheable(). |
|
|
Get the cache item's key.
Definition at line 151 of file Cacheable.java. References com.quadcap.sql.file.Cacheable.key. Referenced by com.quadcap.sql.file.Cache.getCacheable(), and com.quadcap.sql.file.Block.toString(). |
|
|
Read the reference count.
Definition at line 119 of file Cacheable.java. References com.quadcap.sql.file.Cacheable.refCount. Referenced by com.quadcap.sql.file.Cache.getCacheable(). |
|
|
Return the cache to which this cacheable belongs.
Definition at line 89 of file Cacheable.java. References com.quadcap.sql.file.Cacheable.store. |
|
|
Increment the reference count.
Definition at line 129 of file Cacheable.java. References com.quadcap.sql.file.Cacheable.refCount. Referenced by com.quadcap.sql.file.Cache.getCacheable(). |
|
||||||||||||
|
Initialization and (recycling).
Reimplemented in com.quadcap.sql.file.Block. Definition at line 80 of file Cacheable.java. References com.quadcap.sql.file.Cacheable.dirty, com.quadcap.sql.file.Cacheable.init(), com.quadcap.sql.file.Cacheable.key, and com.quadcap.sql.file.Cacheable.store. Referenced by com.quadcap.sql.file.Cache.getCacheable(), and com.quadcap.sql.file.Cacheable.init(). |
|
|
Read the dirty bit.
Definition at line 104 of file Cacheable.java. References com.quadcap.sql.file.Cacheable.dirty. Referenced by com.quadcap.sql.file.Cache.getCacheable(). |
|
|
Am I read only?
Definition at line 94 of file Cacheable.java. References com.quadcap.sql.file.Cacheable.readOnly. |
|
|
Set the cache item's data.
Implemented in com.quadcap.sql.file.Block. Referenced by com.quadcap.sql.file.Cache.put(). |
|
|
Set the dirty bit.
Definition at line 109 of file Cacheable.java. References com.quadcap.sql.file.Cacheable.dirty, com.quadcap.sql.file.Cacheable.readOnly, and com.quadcap.sql.file.Cacheable.setDirty(). Referenced by com.quadcap.sql.index.Bnode.moveKeys(), and com.quadcap.sql.file.Cacheable.setDirty(). |
|
|
Set the LRU back pointer.
Definition at line 141 of file Cacheable.java. References com.quadcap.sql.file.Cacheable.me, and com.quadcap.sql.file.Cacheable.setDListItem(). Referenced by com.quadcap.sql.file.Cache.getCacheable(), and com.quadcap.sql.file.Cacheable.setDListItem(). |
|
|
Set the cache item's key.
Definition at line 156 of file Cacheable.java. References com.quadcap.sql.file.Cacheable.setKey(). Referenced by com.quadcap.sql.file.Cacheable.setKey(). |
|
|
Set the 'read only' flag.
Definition at line 99 of file Cacheable.java. References com.quadcap.sql.file.Cacheable.setReadOnly(). Referenced by com.quadcap.sql.file.Cache.getCacheable(), and com.quadcap.sql.file.Cacheable.setReadOnly(). |
|
|
Set the reference count.
Definition at line 124 of file Cacheable.java. References com.quadcap.sql.file.Cacheable.refCount, and com.quadcap.sql.file.Cacheable.setRefCount(). Referenced by com.quadcap.sql.file.Cacheable.setRefCount(). |
|
|
has object been modified while in the cache?
Definition at line 53 of file Cacheable.java. Referenced by com.quadcap.sql.file.Cacheable.flush(), com.quadcap.sql.file.Cacheable.init(), com.quadcap.sql.file.Cacheable.isDirty(), and com.quadcap.sql.file.Cacheable.setDirty(). |
|
|
The key used to locate this item in the underlying store, as well as in the cache itself.
Definition at line 73 of file Cacheable.java. Referenced by com.quadcap.sql.file.Cacheable.getKey(), and com.quadcap.sql.file.Cacheable.init(). |
|
|
Back pointer to my place in the LRU list.
Definition at line 67 of file Cacheable.java. Referenced by com.quadcap.sql.file.Cacheable.getDListItem(), and com.quadcap.sql.file.Cacheable.setDListItem(). |
|
|
Is this cache item read only?
Definition at line 56 of file Cacheable.java. Referenced by com.quadcap.sql.file.Cacheable.isReadOnly(), and com.quadcap.sql.file.Cacheable.setDirty(). |
|
|
We reference-count the cache items to know when it's ok to flush older items to make room for new ones.
We should probably keep some statistics which keep track of the percentage of cache items currently "in-use"; i.e., with Definition at line 64 of file Cacheable.java. Referenced by com.quadcap.sql.file.Cacheable.decrRefCount(), com.quadcap.sql.file.Cacheable.getRefCount(), com.quadcap.sql.file.Cacheable.incrRefCount(), and com.quadcap.sql.file.Cacheable.setRefCount(). |
|
|
Definition at line 75 of file Cacheable.java. Referenced by com.quadcap.sql.file.Cacheable.getStore(), and com.quadcap.sql.file.Cacheable.init(). |