Guvnor - Services API 6.0.0.CR2

org.guvnor.common.services.backend.cache
Class LRUCache<Path,V>

java.lang.Object
  extended by org.guvnor.common.services.backend.cache.LRUCache<Path,V>
All Implemented Interfaces:
Cache<Path,V>

public abstract class LRUCache<Path,V>
extends Object
implements Cache<Path,V>

A simple LRU cache keyed on Paths


Constructor Summary
LRUCache()
           
 
Method Summary
 V getEntry(Path path)
          Retrieve the cache entry for the specified key.
 Set<Path> getKeys()
           
 void invalidateCache()
          Invalidate the entire cache
 void invalidateCache(Path path)
          Invalidate the cache for a specific key.
 void setEntry(Path path, V value)
          Set the cache entry for the specified path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LRUCache

public LRUCache()
Method Detail

getEntry

public V getEntry(Path path)
Description copied from interface: Cache
Retrieve the cache entry for the specified key.

Specified by:
getEntry in interface Cache<Path,V>
Parameters:
path - The cache entry key
Returns:
V The cache entry

setEntry

public void setEntry(Path path,
                     V value)
Description copied from interface: Cache
Set the cache entry for the specified path.

Specified by:
setEntry in interface Cache<Path,V>
Parameters:
path - The cache entry key
value - The cache entry

invalidateCache

public void invalidateCache()
Description copied from interface: Cache
Invalidate the entire cache

Specified by:
invalidateCache in interface Cache<Path,V>

invalidateCache

public void invalidateCache(Path path)
Description copied from interface: Cache
Invalidate the cache for a specific key.

Specified by:
invalidateCache in interface Cache<Path,V>
Parameters:
path - The cache entry key

getKeys

public Set<Path> getKeys()

Guvnor - Services API 6.0.0.CR2

Copyright © 2001-2013 JBoss by Red Hat. All Rights Reserved.