|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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()
|
FinderQuery<ClassMapping,SelectExecutor,Result> |
get(ClassMapping mapping,
FetchConfiguration fetch)
Gets the finder query for the given mapping. |
boolean |
getEnableStats()
|
List<String> |
getExcludes()
|
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)
|
boolean |
isExcluded(ClassMapping mapping)
Affirms if the given mapping is excluded from being cached. |
FinderQuery<ClassMapping,SelectExecutor,Result> |
markUncachable(ClassMapping mapping)
|
FinderQuery<ClassMapping,SelectExecutor,Result> |
markUncachable(String id)
|
void |
removeExclusionPattern(String pattern)
Removes a pattern for exclusion. |
void |
setConfiguration(org.apache.openjpa.lib.conf.Configuration conf)
|
void |
setEnableStats(boolean b)
|
void |
setExcludes(String excludes)
|
void |
startConfiguration()
|
| 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>
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 operationIf 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)
invalidate in interface FinderCache<ClassMapping,SelectExecutor,Result>public FinderQuery<ClassMapping,SelectExecutor,Result> markUncachable(ClassMapping mapping)
markUncachable in interface FinderCache<ClassMapping,SelectExecutor,Result>public FinderQuery<ClassMapping,SelectExecutor,Result> markUncachable(String id)
public void setExcludes(String excludes)
public List<String> getExcludes()
getExcludes in interface FinderCache<ClassMapping,SelectExecutor,Result>public void setEnableStats(boolean b)
public boolean getEnableStats()
public void startConfiguration()
startConfiguration in interface org.apache.openjpa.lib.conf.Configurablepublic void setConfiguration(org.apache.openjpa.lib.conf.Configuration conf)
setConfiguration in interface org.apache.openjpa.lib.conf.Configurablepublic void endConfiguration()
endConfiguration in interface org.apache.openjpa.lib.conf.Configurable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||