org.apache.openjpa.persistence
Class QueryResultCacheImpl

java.lang.Object
  extended by org.apache.openjpa.persistence.QueryResultCacheImpl
All Implemented Interfaces:
QueryResultCache

public class QueryResultCacheImpl
extends Object
implements QueryResultCache

Implements Query result cache via delegation to QueryCache.

Since:
0.4.1
Author:
Abe White

Constructor Summary
QueryResultCacheImpl(QueryCache cache)
          Constructor; supply delegate.
 
Method Summary
 boolean equals(Object other)
           
 void evict(Query q)
          Evict a query result from the cache.
 void evictAll()
          Clear the cache.
 void evictAll(Class cls)
          Evict all result for queries involving the given class.
 QueryCache getDelegate()
          Delegate.
 int hashCode()
           
 void pin(Query q)
          Pin the given query's result to the cache.
 void unpin(Query q)
          Unpin a previously-pinned query result.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryResultCacheImpl

public QueryResultCacheImpl(QueryCache cache)
Constructor; supply delegate.

Method Detail

getDelegate

public QueryCache getDelegate()
Delegate.


pin

public void pin(Query q)
Description copied from interface: QueryResultCache
Pin the given query's result to the cache.

Specified by:
pin in interface QueryResultCache

unpin

public void unpin(Query q)
Description copied from interface: QueryResultCache
Unpin a previously-pinned query result.

Specified by:
unpin in interface QueryResultCache

evict

public void evict(Query q)
Description copied from interface: QueryResultCache
Evict a query result from the cache.

Specified by:
evict in interface QueryResultCache

evictAll

public void evictAll()
Description copied from interface: QueryResultCache
Clear the cache.

Specified by:
evictAll in interface QueryResultCache

evictAll

public void evictAll(Class cls)
Description copied from interface: QueryResultCache
Evict all result for queries involving the given class.

Specified by:
evictAll in interface QueryResultCache

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object


Copyright © 2006-2007 Apache Software Foundation. All Rights Reserved.