Package org.apache.openjpa.persistence
Class QueryResultCacheImpl
- java.lang.Object
-
- org.apache.openjpa.persistence.QueryResultCacheImpl
-
- All Implemented Interfaces:
QueryResultCache
public class QueryResultCacheImpl extends java.lang.Object implements QueryResultCache
Implements Query result cache via delegation to QueryCache.- Since:
- 0.4.1
- Author:
- Abe White
-
-
Constructor Summary
Constructors Constructor Description QueryResultCacheImpl(QueryCache cache)Constructor; supply delegate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object other)voidevict(jakarta.persistence.Query q)Evict a query result from the cache.voidevictAll()Clear the cache.voidevictAll(java.lang.Class cls)Evict all result for queries involving the given class.QueryCachegetDelegate()Delegate.inthashCode()voidpin(jakarta.persistence.Query q)Pin the given query's result to the cache.voidunpin(jakarta.persistence.Query q)Unpin a previously-pinned query result.
-
-
-
Constructor Detail
-
QueryResultCacheImpl
public QueryResultCacheImpl(QueryCache cache)
Constructor; supply delegate.
-
-
Method Detail
-
getDelegate
public QueryCache getDelegate()
Delegate.- Specified by:
getDelegatein interfaceQueryResultCache
-
pin
public void pin(jakarta.persistence.Query q)
Description copied from interface:QueryResultCachePin the given query's result to the cache.- Specified by:
pinin interfaceQueryResultCache
-
unpin
public void unpin(jakarta.persistence.Query q)
Description copied from interface:QueryResultCacheUnpin a previously-pinned query result.- Specified by:
unpinin interfaceQueryResultCache
-
evict
public void evict(jakarta.persistence.Query q)
Description copied from interface:QueryResultCacheEvict a query result from the cache.- Specified by:
evictin interfaceQueryResultCache
-
evictAll
public void evictAll()
Description copied from interface:QueryResultCacheClear the cache.- Specified by:
evictAllin interfaceQueryResultCache
-
evictAll
public void evictAll(java.lang.Class cls)
Description copied from interface:QueryResultCacheEvict all result for queries involving the given class.- Specified by:
evictAllin interfaceQueryResultCache
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
-