|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.openjpa.jdbc.kernel.PreparedQueryCacheImpl
public class PreparedQueryCacheImpl
An implementation of the cache of prepared queries.
| Nested Class Summary | |
|---|---|
static class |
PreparedQueryCacheImpl.StrongExclusion
Strong exclusion. |
static class |
PreparedQueryCacheImpl.WeakExclusion
Weak exclusion. |
| Nested classes/interfaces inherited from interface org.apache.openjpa.kernel.PreparedQueryCache |
|---|
PreparedQueryCache.Exclusion |
| Constructor Summary | |
|---|---|
PreparedQueryCacheImpl()
|
|
| Method Summary | |
|---|---|
void |
addExclusionPattern(String pattern)
Adds a pattern for exclusion. |
boolean |
cache(PreparedQuery q)
Cache the given query keyed by its identifier. |
void |
clear()
|
void |
endConfiguration()
|
PreparedQuery |
get(String id)
|
boolean |
getEnableStatistics()
|
List<PreparedQueryCache.Exclusion> |
getExcludes()
|
Map<String,String> |
getMapView()
|
QueryStatistics<String> |
getStatistics()
|
PreparedQuery |
initialize(String key,
Object result)
|
boolean |
invalidate(String id)
|
Boolean |
isCachable(String id)
|
PreparedQueryCache.Exclusion |
isExcluded(String id)
|
(package private) boolean |
isHinted(FetchConfiguration fetch,
String hint)
|
protected void |
lock(boolean readOnly)
Note: Care needs to be taken so that a read lock is never held while requesting a write lock. |
PreparedQuery |
markUncachable(String id,
PreparedQueryCache.Exclusion exclusion)
|
(package private) boolean |
matches(String pattern,
String target)
|
Boolean |
register(String id,
Query query,
FetchConfiguration hints)
|
void |
removeExclusionPattern(String pattern)
Removes a pattern for exclusion. |
void |
setConfiguration(Configuration conf)
|
void |
setEnableStatistics(boolean enable)
|
void |
setExcludes(String excludes)
|
void |
startConfiguration()
|
protected void |
unlock(boolean readOnly)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PreparedQueryCacheImpl()
| Method Detail |
|---|
public Boolean register(String id,
Query query,
FetchConfiguration hints)
register in interface PreparedQueryCachepublic Map<String,String> getMapView()
getMapView in interface PreparedQueryCachepublic boolean cache(PreparedQuery q)
cache in interface PreparedQueryCache
public PreparedQuery initialize(String key,
Object result)
initialize in interface PreparedQueryCachepublic boolean invalidate(String id)
invalidate in interface PreparedQueryCachepublic PreparedQuery get(String id)
get in interface PreparedQueryCachepublic Boolean isCachable(String id)
isCachable in interface PreparedQueryCache
public PreparedQuery markUncachable(String id,
PreparedQueryCache.Exclusion exclusion)
markUncachable in interface PreparedQueryCachepublic PreparedQueryCache.Exclusion isExcluded(String id)
isExcluded in interface PreparedQueryCachepublic void setExcludes(String excludes)
setExcludes in interface PreparedQueryCachepublic List<PreparedQueryCache.Exclusion> getExcludes()
getExcludes in interface PreparedQueryCachepublic void addExclusionPattern(String pattern)
addExclusionPattern in interface PreparedQueryCachepublic void removeExclusionPattern(String pattern)
removeExclusionPattern in interface PreparedQueryCachepublic QueryStatistics<String> getStatistics()
getStatistics in interface PreparedQueryCacheprotected void lock(boolean readOnly)
readOnly - - If true, a read lock will be acquired. Else a write lock will be acquired.protected void unlock(boolean readOnly)
readOnly - - If true, the read lock will be released. Else a write lock will be released.
boolean matches(String pattern,
String target)
boolean isHinted(FetchConfiguration fetch,
String hint)
public void clear()
clear in interface PreparedQueryCachepublic void setEnableStatistics(boolean enable)
setEnableStatistics in interface PreparedQueryCachepublic boolean getEnableStatistics()
getEnableStatistics in interface PreparedQueryCachepublic void setConfiguration(Configuration conf)
setConfiguration in interface Configurablepublic void startConfiguration()
startConfiguration in interface Configurablepublic void endConfiguration()
endConfiguration in interface Configurable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||