|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jetspeed.page.impl.DatabasePageManagerCache
public class DatabasePageManagerCache
DatabasePageManagerCache
Nested Class Summary | |
---|---|
private static class |
DatabasePageManagerCache.Entry
Entry Cache entry class adding entry timestamp to track expiration |
Field Summary | |
---|---|
private static HashMap |
cacheByOID
|
private static HashMap |
cacheByPath
|
private static int |
cacheExpiresSeconds
|
private static LinkedList |
cacheLRUList
|
private static int |
cacheSize
|
private static boolean |
constraintsEnabled
|
private static org.apache.jetspeed.page.PageManager |
pageManager
|
private static boolean |
permissionsEnabled
|
protected static ThreadLocal |
transactionedOperations
|
Constructor Summary | |
---|---|
DatabasePageManagerCache(org.apache.ojb.broker.PersistenceBroker broker,
Properties props)
DatabasePageManagerCache Construct a cache instance using OJB compliant signatures. |
Method Summary | |
---|---|
static void |
addTransaction(TransactionedOperation operation)
|
void |
cache(org.apache.ojb.broker.Identity oid,
Object obj)
|
static void |
cacheAdd(org.apache.ojb.broker.Identity oid,
Object obj)
cacheAdd Add object to cache and cache node instances by unique path; infuse nodes loaded by OJB with page manager configuration. |
static void |
cacheClear()
cacheClear Clear object and node caches. |
static void |
cacheInit(DatabasePageManager dbPageManager)
cacheInit Initialize cache using page manager configuration. |
static Object |
cacheLookup(org.apache.ojb.broker.Identity oid)
cacheLookup Lookup objects by identity. |
static NodeImpl |
cacheLookup(String path)
cacheLookup Lookup node instances by unique path. |
static void |
cacheRemove(org.apache.ojb.broker.Identity oid)
cacheRemove Remove identified object from object and node caches. |
static void |
cacheRemove(String path)
cacheRemove Remove identified object from object and node caches. |
private static void |
cacheRemoveEntry(DatabasePageManagerCache.Entry entry,
boolean remove)
cacheRemoveEntry Remove specified entry from cache. |
private static Object |
cacheValidateEntry(DatabasePageManagerCache.Entry entry)
cacheValidateEntry Validate specified entry from cache, returning cached object if valid. |
void |
clear()
|
static void |
dump()
|
static List |
getTransactions()
|
Object |
lookup(org.apache.ojb.broker.Identity oid)
|
void |
remove(org.apache.ojb.broker.Identity oid)
|
static void |
resetCachedSecurityConstraints()
resetCachedSecurityConstraints Reset cached security constraints in all cached node objects. |
static void |
rollbackTransactions()
|
static void |
setPageManagerProxy(org.apache.jetspeed.page.PageManager proxy)
setPageManagerProxy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static HashMap cacheByOID
private static LinkedList cacheLRUList
private static HashMap cacheByPath
private static int cacheSize
private static int cacheExpiresSeconds
private static boolean constraintsEnabled
private static boolean permissionsEnabled
private static org.apache.jetspeed.page.PageManager pageManager
protected static ThreadLocal transactionedOperations
Constructor Detail |
---|
public DatabasePageManagerCache(org.apache.ojb.broker.PersistenceBroker broker, Properties props)
broker
- broker that is to own cacheprops
- attribute properties passed to cacheMethod Detail |
---|
public static void cacheInit(DatabasePageManager dbPageManager)
pageManager
- configured page managerpublic static void setPageManagerProxy(org.apache.jetspeed.page.PageManager proxy)
proxy
- proxied page manager interface used to
inject into Folder instances to provide
transaction/interceptionpublic static NodeImpl cacheLookup(String path)
path
- node unique path
public static void cacheAdd(org.apache.ojb.broker.Identity oid, Object obj)
oid
- object/node indentityobj
- object/node to cachepublic static void cacheClear()
public static Object cacheLookup(org.apache.ojb.broker.Identity oid)
oid
- object identity
public static void cacheRemove(org.apache.ojb.broker.Identity oid)
oid
- object identitypublic static void cacheRemove(String path)
path
- object pathprivate static Object cacheValidateEntry(DatabasePageManagerCache.Entry entry)
entry
- cache entry to validate
private static void cacheRemoveEntry(DatabasePageManagerCache.Entry entry, boolean remove)
entry
- cache entry to removeremove
- enable removal from cachepublic static void resetCachedSecurityConstraints()
public void cache(org.apache.ojb.broker.Identity oid, Object obj)
cache
in interface org.apache.ojb.broker.cache.ObjectCache
public void clear()
clear
in interface org.apache.ojb.broker.cache.ObjectCache
public Object lookup(org.apache.ojb.broker.Identity oid)
lookup
in interface org.apache.ojb.broker.cache.ObjectCache
public void remove(org.apache.ojb.broker.Identity oid)
remove
in interface org.apache.ojb.broker.cache.ObjectCache
public static void dump()
public static List getTransactions()
public static void addTransaction(TransactionedOperation operation)
principal
- The principal to set.public static void rollbackTransactions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |