|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.openjpa.jdbc.kernel.FinderCacheImpl
public class FinderCacheImpl
Implementation of FinderCache for JDBC.
Constructor Summary | |
---|---|
FinderCacheImpl()
|
Method Summary | |
---|---|
void |
addExclusionPattern(String pattern)
Adds a pattern for exclusion. |
FinderQuery<ClassMapping,SelectExecutor,Result> |
cache(ClassMapping mapping,
SelectExecutor select,
FetchConfiguration fetch)
Cache a Finder Query for the given mapping and select. |
void |
endConfiguration()
Invoked upon completion of bean property configuration for this object. |
FinderQuery<ClassMapping,SelectExecutor,Result> |
get(ClassMapping mapping,
FetchConfiguration fetch)
Gets the finder query for the given mapping. |
List<String> |
getExcludes()
Gets the excluded stringified keys. |
Map<String,String> |
getMapView()
Get a map-oriented view of the cache. |
QueryStatistics<ClassMapping> |
getStatistics()
Gets basic statistics of execution and hit count of finder queries. |
boolean |
invalidate(ClassMapping mapping)
Remove the FinderQuery for the given key from this cache. |
boolean |
isExcluded(ClassMapping mapping)
Affirms if the given mapping is excluded from being cached. |
FinderQuery<ClassMapping,SelectExecutor,Result> |
markUncachable(ClassMapping mapping)
Marks the given key as not amenable to caching. |
FinderQuery<ClassMapping,SelectExecutor,Result> |
markUncachable(String id)
|
void |
removeExclusionPattern(String pattern)
Removes a pattern for exclusion. |
void |
setConfiguration(Configuration conf)
Invoked prior to setting bean properties. |
void |
setExcludes(String excludes)
|
void |
startConfiguration()
Invoked before bean property configuration is begun on this object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FinderCacheImpl()
Method Detail |
---|
public Map<String,String> getMapView()
getMapView
in interface FinderCache<ClassMapping,SelectExecutor,Result>
public QueryStatistics<ClassMapping> getStatistics()
getStatistics
in interface FinderCache<ClassMapping,SelectExecutor,Result>
public FinderQuery<ClassMapping,SelectExecutor,Result> get(ClassMapping mapping, FetchConfiguration fetch)
HINT_IGNORE_FINDER
will ignore
any cached finder that may exist in this cache and will return null.
HINT_INVALIDATE_FINDER
will
invalidate any cached finder that may exist in this cache and will return
null.
get
in interface FinderCache<ClassMapping,SelectExecutor,Result>
mapping
- for which the finder is looked up
public FinderQuery<ClassMapping,SelectExecutor,Result> cache(ClassMapping mapping, SelectExecutor select, FetchConfiguration fetch)
cache
in interface FinderCache<ClassMapping,SelectExecutor,Result>
mapping
- the class for which the finder is to be cachedselect
- the finder queryfetch
- may contain hints to control cache operation
If a entry for the given mapping exists then the value of
{@link QueryHints#HINT_RECACHE_FINDER HINT_RECACHE_FINDER} hint
determines whether the existing entry is returned or a new FinderQuery
with the given argument overwrites the existing one.
public boolean isExcluded(ClassMapping mapping)
isExcluded
in interface FinderCache<ClassMapping,SelectExecutor,Result>
public void addExclusionPattern(String pattern)
addExclusionPattern
in interface FinderCache<ClassMapping,SelectExecutor,Result>
public void removeExclusionPattern(String pattern)
removeExclusionPattern
in interface FinderCache<ClassMapping,SelectExecutor,Result>
public boolean invalidate(ClassMapping mapping)
FinderCache
invalidate
in interface FinderCache<ClassMapping,SelectExecutor,Result>
public FinderQuery<ClassMapping,SelectExecutor,Result> markUncachable(ClassMapping mapping)
FinderCache
markUncachable
in interface FinderCache<ClassMapping,SelectExecutor,Result>
public FinderQuery<ClassMapping,SelectExecutor,Result> markUncachable(String id)
public void setExcludes(String excludes)
public List<String> getExcludes()
FinderCache
getExcludes
in interface FinderCache<ClassMapping,SelectExecutor,Result>
public void startConfiguration()
Configurable
startConfiguration
in interface Configurable
public void setConfiguration(Configuration conf)
Configurable
setConfiguration
in interface Configurable
public void endConfiguration()
Configurable
endConfiguration
in interface Configurable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |