| Package | Description |
|---|---|
| jdbm.helper |
Miscelaneous utility classes and interfaces.
|
| Modifier and Type | Field and Description |
|---|---|
private ExplicitList.Link<LRUCache.CacheEntry> |
LRUCache.CacheEntry.lruLink
Used to put on lru list
|
private ExplicitList<LRUCache.CacheEntry> |
LRUCache.LRU.mostRecentVersions
List of entries representing most recent versions
|
private ExplicitList<LRUCache.CacheEntry> |
LRUCache.LRU.snapshotVersions
List of snapshot entries
|
private ExplicitList.Link<LRUCache.CacheEntry> |
LRUCache.CacheEntry.versionsLink
Used to build a sorted chain of versions with the most current entry at the head
|
| Modifier and Type | Method and Description |
|---|---|
private LRUCache.CacheEntry |
LRUCache.findNewEntry(K key,
int latchIndex)
Finds a victim entry to be replaced by the given key.
|
LRUCache.CacheEntry |
LRUCache.LRU.findVictim(int latchIndex)
Finds a freeable entry from the lru.
|
| Modifier and Type | Method and Description |
|---|---|
ExplicitList.Link<LRUCache.CacheEntry> |
LRUCache.CacheEntry.getLruLink() |
ExplicitList.Link<LRUCache.CacheEntry> |
LRUCache.CacheEntry.getVersionsLink() |
| Modifier and Type | Method and Description |
|---|---|
void |
LRUCache.LRU.addToLRU(LRUCache.CacheEntry entry)
add the new entry to the head of the lru
|
void |
LRUCache.LRU.addToSnapshots(LRUCache.CacheEntry entry)
Removes the entry from the lru list and Adds the entry to the list of snapshot entries.
|
private void |
LRUCache.doRead(LRUCache.CacheEntry entry,
java.util.concurrent.locks.Lock latch,
Serializer serializer)
Does read the value for the given entry.
|
private void |
LRUCache.doWaitForStateChange(LRUCache.CacheEntry entry,
java.util.concurrent.locks.Lock latch)
Wait for the state change to happen.
|
void |
LRUCache.LRU.moveToTail(LRUCache.CacheEntry entry)
Moves the entry to the cold end of the lru.
|
private void |
LRUCache.putNewVersion(LRUCache.CacheEntry entry,
K key,
V value,
long newVersion,
int hashIndex,
java.util.concurrent.locks.Lock latch,
Serializer serializer,
boolean neverReplace)
Creates a new version of the given entry with the given new version.
|
private V |
LRUCache.searchChainForVersion(LRUCache.CacheEntry head,
long version,
boolean neverReplace)
Searches the given version for the entry that can satisfy the read with the
given version and returns the value of that entry.
|
void |
LRUCache.LRU.touch(LRUCache.CacheEntry entry)
Increases the hotness of the given entry
|