public final class OptimizedCache extends SimpleCache
SimpleCache,
Cache,
DoubleCache| Modifier and Type | Field and Description |
|---|---|
protected int |
num_partial_clears
we take note every time the cache is partially cleaned, for statistics...
|
protected long |
partial_count
more statistics...
|
protected long |
partial_given_up
more statistics...
|
protected long |
partial_kept
more statistics...
|
protected int |
possible_bins_count
possible_bins_count is the number of possible (at most) entries in the table.
|
answer, bdds, cache_size, hash_value, hit, last_access, last_hit, members, miss, num_access, num_clears, num_grows, width| Constructor and Description |
|---|
OptimizedCache(String name,
int size,
int members,
int bdds) |
| Modifier and Type | Method and Description |
|---|---|
int |
getNumberOfPartialClears()
number of times cache was partially
|
protected void |
grow_and_invalidate_cache()
grow the cache and invalidate everything [since the hash function hash chagned]
|
void |
insert(int hash,
int key1,
int value)
this is the _correct_ way to insert something into the cache.
|
void |
insert(int hash,
int key1,
int key2,
int value)
this is the _correct_ way to insert something into the cache.
|
void |
insert(int hash,
int key1,
int key2,
int key3,
int value)
this is the _correct_ way to insert something into the cache.
|
static void |
internal_test()
testbench.
|
void |
invalidate_cache()
just wipe the cache
|
void |
invalidate_cache(NodeTable nt)
removes the elements that are garbage collected.
|
protected boolean |
shouldWipeUnusedCache()
If this function returns true, we should wipe the cache entirely instead
of a partial clean
|
void |
showStats() |
check_cache, clear_cache, computeHitRate, computeLoadFactor, free_or_grow, free_or_grow, getAccessCount, getCacheSize, getIn, getMemoryUsage, getNumberOfClears, getNumberOfGrows, getOut, getSize, good_hash, good_hash, good_hash, invalidate, isValid, lookup, lookup, lookup, may_grow, setIn, setOut, show_tupleprotected int possible_bins_count
protected int num_partial_clears
protected long partial_count
protected long partial_kept
protected long partial_given_up
public OptimizedCache(String name, int size, int members, int bdds)
protected boolean shouldWipeUnusedCache()
public void invalidate_cache()
SimpleCacheinvalidate_cache in class SimpleCacheprotected void grow_and_invalidate_cache()
SimpleCachegrow_and_invalidate_cache in class SimpleCachepublic void invalidate_cache(NodeTable nt)
invalidate_cache in class SimpleCachepublic void insert(int hash,
int key1,
int value)
SimpleCacheinsert in class SimpleCachepublic void insert(int hash,
int key1,
int key2,
int value)
SimpleCacheinsert in class SimpleCachepublic void insert(int hash,
int key1,
int key2,
int key3,
int value)
SimpleCacheinsert in class SimpleCachepublic int getNumberOfPartialClears()
CacheBasegetNumberOfPartialClears in class SimpleCachepublic void showStats()
showStats in class SimpleCachepublic static void internal_test()
This file is a part of the JDD package, a native Java Binary Decision Diagram Library.