Manages memory for the cache map and its contents based on least recently used clearup.
Also provides services for selecting rows to be saved and passing them to DataFileCache.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private long | |
| private long | |
| private int | |
| pack-priv final DataFileCache | |
| private final BaseHashMap. | |
| private int | |
| private final Cache. | |
| private CachedObject[] | |
| pack-priv StopWatch | |
| pack-priv int | |
| pack-priv StopWatch | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public void | |
| pack-priv void | |
| public CachedObject | |
| protected AtomicInteger | |
| public Iterator | |
| pack-priv long | |
| pack-priv void | |
| pack-priv boolean | |
| pack-priv void | |
| private void | |
| pack-priv void | putUsingReserve(CachedObject row)
reserve slots may be used and storage size may exceed bytesCapacity |
| pack-priv CachedObject | |
| public void | |
| public void | |
| pack-priv void | |
| private void | |
| private void | |
| private void |
| bytesCapacity | back to summary |
|---|---|
| private long bytesCapacity | |
| cacheBytesLength | back to summary |
|---|---|
| private long cacheBytesLength | |
| capacity | back to summary |
|---|---|
| private int capacity | |
| dataFileCache | back to summary |
|---|---|
| pack-priv final DataFileCache dataFileCache | |
| objectIterator | back to summary |
|---|---|
| private final BaseHashMap. | |
| reserveCount | back to summary |
|---|---|
| private int reserveCount | |
| rowComparator | back to summary |
|---|---|
| private final Cache. | |
| rowTable | back to summary |
|---|---|
| private CachedObject[] rowTable | |
| saveAllTimer | back to summary |
|---|---|
| pack-priv StopWatch saveAllTimer | |
| saveRowCount | back to summary |
|---|---|
| pack-priv int saveRowCount | |
| shadowTimer | back to summary |
|---|---|
| pack-priv StopWatch shadowTimer | |
| updateAccess | back to summary |
|---|---|
| private final boolean updateAccess | |
| Cache | back to summary |
|---|---|
| pack-priv Cache(DataFileCache dfc) | |
| cleanUp | back to summary |
|---|---|
| private void cleanUp(boolean all) Reduces the number of rows held in this Cache object. Cleanup is done by checking the accessCount of the Rows and removing the rows with the lowest access count. Index operations require that some rows remain in the cache. This is ensured by prior calling keepInMemory(). | |
| clear | back to summary |
|---|---|
| public void clear() Overrides org. clears out the memory cache | |
| clearUnchanged | back to summary |
|---|---|
| pack-priv void clearUnchanged() | |
| get | back to summary |
|---|---|
| public CachedObject get(long pos) Returns a row if in memory cache. | |
| getAccessCount | back to summary |
|---|---|
| protected AtomicInteger getAccessCount() | |
| getIterator | back to summary |
|---|---|
| public Iterator | |
| getTotalCachedBlockSize | back to summary |
|---|---|
| pack-priv long getTotalCachedBlockSize() | |
| logSaveRowsEvent | back to summary |
|---|---|
| pack-priv void logSaveRowsEvent(int saveCount, long storageSize, long startTime) | |
| preparePut | back to summary |
|---|---|
| pack-priv boolean preparePut(int storageSize) | |
| put | back to summary |
|---|---|
| pack-priv void put(CachedObject row) Adds a row to the cache. | |
| putNoCheck | back to summary |
|---|---|
| private void putNoCheck(CachedObject row) | |
| putUsingReserve | back to summary |
|---|---|
| pack-priv void putUsingReserve(CachedObject row) reserve slots may be used and storage size may exceed bytesCapacity | |
| release | back to summary |
|---|---|
| pack-priv CachedObject release(long pos) Removes an object from memory cache. Does not release the file storage. | |
| releaseRange | back to summary |
|---|---|
| public void releaseRange(IntIndex list, int fileBlockItemCount) | |
| releaseRange | back to summary |
|---|---|
| public void releaseRange(long startPos, long limitPos) | |
| saveAll | back to summary |
|---|---|
| pack-priv void saveAll() Writes out all modified cached Rows. | |
| saveRows | back to summary |
|---|---|
| private void saveRows(int count) | |
| updateAccessCounts | back to summary |
|---|---|
| private void updateAccessCounts() | |
| updateObjectAccessCounts | back to summary |
|---|---|
| private void updateObjectAccessCounts() | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int | |
| private long | |
| private int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | compare(CachedObject a, CachedObject b)
Implements java. Compares its two arguments for order. |
| public boolean | |
| public int | |
| public long | |
| pack-priv void |
| COMPARE_LAST_ACCESS | back to summary |
|---|---|
| pack-priv static final int COMPARE_LAST_ACCESS | |
| COMPARE_POSITION | back to summary |
|---|---|
| pack-priv static final int COMPARE_POSITION | |
| COMPARE_SIZE | back to summary |
|---|---|
| pack-priv static final int COMPARE_SIZE | |
| compareCount | back to summary |
|---|---|
| private long compareCount | |
| compareType | back to summary |
|---|---|
| private int compareType | |
| CachedObjectComparator | back to summary |
|---|---|
| pack-priv CachedObjectComparator() | |
| compare | back to summary |
|---|---|
| public int compare(CachedObject a, CachedObject b) Implements java. Doc from java. Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.
The implementor must ensure that
The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that | |
| equals | back to summary |
|---|---|
| public boolean equals(CachedObject a, CachedObject b) Implements org. | |
| hashCode | back to summary |
|---|---|
| public int hashCode(CachedObject o) Implements org. | |
| longKey | back to summary |
|---|---|
| public long longKey(CachedObject o) Implements org. | |
| setType | back to summary |
|---|---|
| pack-priv void setType(int type) | |