|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.broker.cache.TwoLevelCache
Constructor Summary | |
TwoLevelCache(PersistenceBroker broker,
java.util.Properties props)
OJB calls this constructor by reflection. |
Method Summary | |
void |
afterBegin(PBStateEvent event)
Called after a PersistenceBroker transaction was started. |
void |
afterCommit(PBStateEvent event)
Called after a PersistenceBroker commit was called. |
void |
afterOpen(PBStateEvent event)
Called after the PersistenceBroker
instance was obtained from pool. |
void |
afterRollback(PBStateEvent event)
Called after a PersistenceBroker rollback was called. |
void |
beforeBegin(PBStateEvent event)
Called before a PersistenceBroker transaction was started. |
void |
beforeClose(PBStateEvent event)
We clear the cache |
void |
beforeCommit(PBStateEvent event)
Called before a PersistenceBroker commit was called. |
void |
beforeRollback(PBStateEvent event)
Called before a PersistenceBroker rollback was called. |
void |
cache(Identity oid,
java.lang.Object obj)
If this method is being called while retrieving the object from database, then the references and collections of obj are filled. |
void |
clear()
Clear ObjectCache. |
static void |
clearSecondLevel()
clear the second level cache, which is shared by all instances in the same VM. |
java.lang.Object |
lookup(Identity oid)
Does an extra lookup in the secondLevelCache if the first lookup fails. |
void |
remove(Identity oid)
Removes an Object from the cache. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TwoLevelCache(PersistenceBroker broker, java.util.Properties props)
props
- ignoredMethod Detail |
public void clear()
clear
in interface ObjectCache
public static void clearSecondLevel()
public void cache(Identity oid, java.lang.Object obj)
cache
in interface ObjectCache
public java.lang.Object lookup(Identity oid)
lookup
in interface ObjectCache
ObjectCachePerBrokerImpl.lookup(org.apache.ojb.broker.Identity)
public java.lang.String toString()
public void remove(Identity oid)
remove
in interface ObjectCache
oid
- Identity of the object to be removed.public void beforeClose(PBStateEvent event)
beforeClose
in interface PBStateListener
public void afterOpen(PBStateEvent event)
PBStateListener
PersistenceBroker
instance was obtained from pool.
afterOpen
in interface PBStateListener
public void beforeBegin(PBStateEvent event)
PBStateListener
beforeBegin
in interface PBStateListener
public void afterBegin(PBStateEvent event)
PBStateListener
afterBegin
in interface PBStateListener
public void beforeCommit(PBStateEvent event)
PBStateListener
beforeCommit
in interface PBStateListener
public void afterCommit(PBStateEvent event)
PBStateListener
afterCommit
in interface PBStateListener
public void beforeRollback(PBStateEvent event)
PBStateListener
beforeRollback
in interface PBStateListener
public void afterRollback(PBStateEvent event)
PBStateListener
afterRollback
in interface PBStateListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |