org.apache.openjpa.persistence
Class StoreCacheImpl

java.lang.Object
  extended by org.apache.openjpa.persistence.StoreCacheImpl
All Implemented Interfaces:
StoreCache

public class StoreCacheImpl
extends Object
implements StoreCache

Implements the L2 cache over the data store via delegation to DataCache.

Since:
0.4.1
Author:
Abe White

Field Summary
 
Fields inherited from interface org.apache.openjpa.persistence.StoreCache
NAME_DEFAULT
 
Constructor Summary
StoreCacheImpl(EntityManagerFactoryImpl emf, DataCache cache)
          Constructor; supply delegate.
 
Method Summary
 boolean contains(Class cls, Object oid)
          Whether the cache contains data for the given oid.
 boolean containsAll(Class cls, Collection oids)
          Whether the cache contains data for the given oids.
 boolean containsAll(Class cls, Object... oids)
          Whether the cache contains data for the given oids.
 boolean equals(Object other)
           
 void evict(Class cls, Object oid)
          Remove data for the given oid from the cache.
 void evictAll()
          Clear the cache.
 void evictAll(Class cls, Collection oids)
          Remove data for the given oids from the cache.
 void evictAll(Class cls, Object... oids)
          Remove data for the given oids from the cache.
 DataCache getDelegate()
          Delegate.
 int hashCode()
           
 void pin(Class cls, Object oid)
          Pin the data for the given oid to the cache.
 void pinAll(Class cls, Collection oids)
          Pin the data for the given oids to the cache.
 void pinAll(Class cls, Object... oids)
          Pin the data for the given oids to the cache.
 void unpin(Class cls, Object oid)
          Unpin the data for the given oid from the cache.
 void unpinAll(Class cls, Collection oids)
          Unpin the data for the given oids from the cache.
 void unpinAll(Class cls, Object... oids)
          Unpin the data for the given oids from the cache.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StoreCacheImpl

public StoreCacheImpl(EntityManagerFactoryImpl emf,
                      DataCache cache)
Constructor; supply delegate.

Method Detail

getDelegate

public DataCache getDelegate()
Delegate.


contains

public boolean contains(Class cls,
                        Object oid)
Description copied from interface: StoreCache
Whether the cache contains data for the given oid.

Specified by:
contains in interface StoreCache

containsAll

public boolean containsAll(Class cls,
                           Object... oids)
Description copied from interface: StoreCache
Whether the cache contains data for the given oids.

Specified by:
containsAll in interface StoreCache

containsAll

public boolean containsAll(Class cls,
                           Collection oids)
Description copied from interface: StoreCache
Whether the cache contains data for the given oids.

Specified by:
containsAll in interface StoreCache

pin

public void pin(Class cls,
                Object oid)
Description copied from interface: StoreCache
Pin the data for the given oid to the cache.

Specified by:
pin in interface StoreCache

pinAll

public void pinAll(Class cls,
                   Object... oids)
Description copied from interface: StoreCache
Pin the data for the given oids to the cache.

Specified by:
pinAll in interface StoreCache

pinAll

public void pinAll(Class cls,
                   Collection oids)
Description copied from interface: StoreCache
Pin the data for the given oids to the cache.

Specified by:
pinAll in interface StoreCache

unpin

public void unpin(Class cls,
                  Object oid)
Description copied from interface: StoreCache
Unpin the data for the given oid from the cache.

Specified by:
unpin in interface StoreCache

unpinAll

public void unpinAll(Class cls,
                     Object... oids)
Description copied from interface: StoreCache
Unpin the data for the given oids from the cache.

Specified by:
unpinAll in interface StoreCache

unpinAll

public void unpinAll(Class cls,
                     Collection oids)
Description copied from interface: StoreCache
Unpin the data for the given oids from the cache.

Specified by:
unpinAll in interface StoreCache

evict

public void evict(Class cls,
                  Object oid)
Description copied from interface: StoreCache
Remove data for the given oid from the cache.

Specified by:
evict in interface StoreCache

evictAll

public void evictAll(Class cls,
                     Object... oids)
Description copied from interface: StoreCache
Remove data for the given oids from the cache.

Specified by:
evictAll in interface StoreCache

evictAll

public void evictAll(Class cls,
                     Collection oids)
Description copied from interface: StoreCache
Remove data for the given oids from the cache.

Specified by:
evictAll in interface StoreCache

evictAll

public void evictAll()
Description copied from interface: StoreCache
Clear the cache.

Specified by:
evictAll in interface StoreCache

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object other)
Overrides:
equals in class Object


Copyright © 2006-2007 Apache Software Foundation. All Rights Reserved.