org.apache.jetspeed.page.impl
Class DatabasePageManagerCache

java.lang.Object
  extended by org.apache.jetspeed.page.impl.DatabasePageManagerCache
All Implemented Interfaces:
org.apache.ojb.broker.cache.ObjectCache

public class DatabasePageManagerCache
extends java.lang.Object
implements org.apache.ojb.broker.cache.ObjectCache

DatabasePageManagerCache

Version:
$Id: $
Author:
Randy Watler

Field Summary
protected static java.lang.ThreadLocal transactionedOperations
           
 
Constructor Summary
DatabasePageManagerCache(org.apache.ojb.broker.PersistenceBroker broker, java.util.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, java.lang.Object obj)
           
static void cacheAdd(org.apache.ojb.broker.Identity oid, java.lang.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 java.lang.Object cacheLookup(org.apache.ojb.broker.Identity oid)
          cacheLookup Lookup objects by identity.
static NodeImpl cacheLookup(java.lang.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(java.lang.String path)
          cacheRemove Remove identified object from object and node caches.
 void clear()
           
static void dump()
           
static java.util.List getTransactions()
           
 java.lang.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(PageManager proxy)
          setPageManagerProxy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

transactionedOperations

protected static java.lang.ThreadLocal transactionedOperations
Constructor Detail

DatabasePageManagerCache

public DatabasePageManagerCache(org.apache.ojb.broker.PersistenceBroker broker,
                                java.util.Properties props)
DatabasePageManagerCache Construct a cache instance using OJB compliant signatures.

Parameters:
broker - broker that is to own cache
props - attribute properties passed to cache
Method Detail

cacheInit

public static void cacheInit(DatabasePageManager dbPageManager)
cacheInit Initialize cache using page manager configuration.

Parameters:
pageManager - configured page manager

setPageManagerProxy

public static void setPageManagerProxy(PageManager proxy)
setPageManagerProxy

Parameters:
proxy - proxied page manager interface used to inject into Folder instances to provide transaction/interception

cacheLookup

public static NodeImpl cacheLookup(java.lang.String path)
cacheLookup Lookup node instances by unique path.

Parameters:
path - node unique path
Returns:
cached node

cacheAdd

public static void cacheAdd(org.apache.ojb.broker.Identity oid,
                            java.lang.Object obj)
cacheAdd Add object to cache and cache node instances by unique path; infuse nodes loaded by OJB with page manager configuration.

Parameters:
oid - object/node indentity
obj - object/node to cache

cacheClear

public static void cacheClear()
cacheClear Clear object and node caches.


cacheLookup

public static java.lang.Object cacheLookup(org.apache.ojb.broker.Identity oid)
cacheLookup Lookup objects by identity.

Parameters:
oid - object identity
Returns:
cached object

cacheRemove

public static void cacheRemove(org.apache.ojb.broker.Identity oid)
cacheRemove Remove identified object from object and node caches.

Parameters:
oid - object identity

cacheRemove

public static void cacheRemove(java.lang.String path)
cacheRemove Remove identified object from object and node caches.

Parameters:
path - object path

resetCachedSecurityConstraints

public static void resetCachedSecurityConstraints()
resetCachedSecurityConstraints Reset cached security constraints in all cached node objects.


cache

public void cache(org.apache.ojb.broker.Identity oid,
                  java.lang.Object obj)
Specified by:
cache in interface org.apache.ojb.broker.cache.ObjectCache

clear

public void clear()
Specified by:
clear in interface org.apache.ojb.broker.cache.ObjectCache

lookup

public java.lang.Object lookup(org.apache.ojb.broker.Identity oid)
Specified by:
lookup in interface org.apache.ojb.broker.cache.ObjectCache

remove

public void remove(org.apache.ojb.broker.Identity oid)
Specified by:
remove in interface org.apache.ojb.broker.cache.ObjectCache

dump

public static void dump()

getTransactions

public static java.util.List getTransactions()

addTransaction

public static void addTransaction(TransactionedOperation operation)
Parameters:
principal - The principal to set.

rollbackTransactions

public static void rollbackTransactions()


Copyright © 1999-2009 Apache Software Foundation. All Rights Reserved.