SableJBDD.cache
Class OneWayCache

java.lang.Object
  extended bySableJBDD.cache.CacheProfiler
      extended bySableJBDD.cache.OneWayCache
All Implemented Interfaces:
Profiling, TripleIntKeyCache

public class OneWayCache
extends CacheProfiler
implements TripleIntKeyCache


Field Summary
 
Fields inherited from interface SableJBDD.bdd.util.Profiling
PROFILING
 
Constructor Summary
OneWayCache(int capacity)
          Defines an one-way cache with a specific associativity.
 
Method Summary
 int getAssociativity()
           
 void invalidate(int key0, int key1, int key2)
          Removes a cache entry matched by a key object.
 java.lang.Object lookup(int key0, int key1, int key2)
          Looks up the value object associated with a key object.
 int numberOfEntries()
           
 void put(int key0, int key1, int key2, java.lang.Object value)
          Puts a (key, value) pair into the cache.
 void reset()
          Resets cache entries.
 
Methods inherited from class SableJBDD.cache.CacheProfiler
accesses, hitRate, hits, misses, missRate, reportStatistics, steps
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface SableJBDD.bdd.util.Profiling
reportStatistics
 

Constructor Detail

OneWayCache

public OneWayCache(int capacity)
Defines an one-way cache with a specific associativity.

Method Detail

lookup

public java.lang.Object lookup(int key0,
                               int key1,
                               int key2)
Looks up the value object associated with a key object.

Specified by:
lookup in interface TripleIntKeyCache
Parameters:
key0 - the 1st key
key1 - the 2nd key
key2 - the 3rd key
Returns:
the value object associated with the key

put

public void put(int key0,
                int key1,
                int key2,
                java.lang.Object value)
Puts a (key, value) pair into the cache.

Specified by:
put in interface TripleIntKeyCache
Parameters:
key0 - the 1st key
key1 - the 2nd key
key2 - the 3rd key
value - the value object

reset

public void reset()
Description copied from interface: TripleIntKeyCache
Resets cache entries.

Specified by:
reset in interface TripleIntKeyCache

invalidate

public void invalidate(int key0,
                       int key1,
                       int key2)
Removes a cache entry matched by a key object.

Specified by:
invalidate in interface TripleIntKeyCache
Parameters:
key0 - the 1st key
key1 - the 2nd key
key2 - the 3rd key

numberOfEntries

public int numberOfEntries()
Specified by:
numberOfEntries in interface TripleIntKeyCache
Returns:
the number of cache entries

getAssociativity

public int getAssociativity()
Specified by:
getAssociativity in interface TripleIntKeyCache
Returns:
the cache associativity