org.alfresco.repo.avm
Class LookupCache

java.lang.Object
  extended by org.alfresco.repo.avm.LookupCache

public class LookupCache
extends java.lang.Object

All lookup traffic goes through here.


Constructor Summary
LookupCache()
          Make one up.
 
Method Summary
 org.alfresco.repo.avm.Lookup lookup(AVMStore store, int version, SimplePath path, boolean write, boolean includeDeleted)
          Lookup a path.
 void onDelete(java.lang.String storeName)
          Called when a delete has occurred in a store.
 void onSnapshot(java.lang.String storeName)
          Called when a snapshot occurs in a store.
 void onWrite(java.lang.String storeName)
          Called when a simple write operation occurs.
 void reset()
           
 void setAvmNodeDAO(AVMNodeDAO dao)
          Set up the node dao.
 void setAvmStoreDAO(AVMStoreDAO dao)
          Set the store dao.
 void setTransactionalCache(SimpleCache cache)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LookupCache

public LookupCache()
Make one up.

Method Detail

setAvmNodeDAO

public void setAvmNodeDAO(AVMNodeDAO dao)
Set up the node dao.

Parameters:
dao - The dao to set.

setAvmStoreDAO

public void setAvmStoreDAO(AVMStoreDAO dao)
Set the store dao.

Parameters:
dao - The dao to set.

setTransactionalCache

public void setTransactionalCache(SimpleCache cache)

lookup

public org.alfresco.repo.avm.Lookup lookup(AVMStore store,
                                           int version,
                                           SimplePath path,
                                           boolean write,
                                           boolean includeDeleted)
Lookup a path. Try to fulfill the request from the cache.

Parameters:
store - The AVMStore.
version - The versions.
path - The path we are looking up.
write - Whether this is a write lookup.
includeDeleted -
Returns:

onWrite

public void onWrite(java.lang.String storeName)
Called when a simple write operation occurs. This invalidates all read lookups and all layered lookups.


onDelete

public void onDelete(java.lang.String storeName)
Called when a delete has occurred in a store. This invalidates both reads and write lookups in that store.


onSnapshot

public void onSnapshot(java.lang.String storeName)
Called when a snapshot occurs in a store. This invalidates write lookups. Read lookups stay untouched.


reset

public void reset()


Copyright © 2005 - 2008 Alfresco Software, Inc. All Rights Reserved.