javax.jdo.datastore
Interface DataStoreCache

All Known Implementing Classes:
DataStoreCache.EmptyDataStoreCache

public interface DataStoreCache

Many JDO implementations allow instances to be cached in a second-level cache, and allow direct management of the cache by knowledgeable applications. This interface standardizes this behavior.

Since:
2.0
Version:
2.0

Nested Class Summary
static class DataStoreCache.EmptyDataStoreCache
          This class is an empty implementation of the DataStoreCache interface.
 
Method Summary
 void evict(java.lang.Object oid)
          Evict the parameter instance from the second-level cache.
 void evictAll()
          Evict the parameter instances from the second-level cache.
 void evictAll(boolean subclasses, java.lang.Class pcClass)
          Evict the parameter instances from the second-level cache.
 void evictAll(java.lang.Class pcClass, boolean subclasses)
          Deprecated. use evictAll (boolean subclasses, Class pcClass)
 void evictAll(java.util.Collection oids)
          Evict the parameter instances from the second-level cache.
 void evictAll(java.lang.Object... oids)
          Evict the parameter instances from the second-level cache.
 void pin(java.lang.Object oid)
          Pin the parameter instance in the second-level cache.
 void pinAll(boolean subclasses, java.lang.Class pcClass)
          Pin instances in the second-level cache.
 void pinAll(java.lang.Class pcClass, boolean subclasses)
          Deprecated. use pinAll (boolean subclasses, Class pcClass)
 void pinAll(java.util.Collection oids)
          Pin the parameter instances in the second-level cache.
 void pinAll(java.lang.Object... oids)
          Pin the parameter instances in the second-level cache.
 void unpin(java.lang.Object oid)
          Unpin the parameter instance from the second-level cache.
 void unpinAll(boolean subclasses, java.lang.Class pcClass)
          Unpin instances from the second-level cache.
 void unpinAll(java.lang.Class pcClass, boolean subclasses)
          Deprecated. use unpinAll(boolean subclasses, Class pcClass)
 void unpinAll(java.util.Collection oids)
          Unpin the parameter instances from the second-level cache.
 void unpinAll(java.lang.Object... oids)
          Unpin the parameter instance from the second-level cache.
 

Method Detail

evict

void evict(java.lang.Object oid)
Evict the parameter instance from the second-level cache.

Parameters:
oid - the object id of the instance to evict.
Since:
2.0

evictAll

void evictAll()
Evict the parameter instances from the second-level cache. All instances in the PersistenceManager's cache are evicted from the second-level cache.

Since:
2.0

evictAll

void evictAll(java.lang.Object... oids)
Evict the parameter instances from the second-level cache.

Parameters:
oids - the object ids of the instance to evict.
Since:
2.0

evictAll

void evictAll(java.util.Collection oids)
Evict the parameter instances from the second-level cache.

Parameters:
oids - the object ids of the instance to evict.
Since:
2.0

evictAll

void evictAll(java.lang.Class pcClass,
              boolean subclasses)
Deprecated. use evictAll (boolean subclasses, Class pcClass)

Evict the parameter instances from the second-level cache.

Parameters:
pcClass - the class of instances to evict
subclasses - if true, evict instances of subclasses also
Since:
2.0

evictAll

void evictAll(boolean subclasses,
              java.lang.Class pcClass)
Evict the parameter instances from the second-level cache.

Parameters:
pcClass - the class of instances to evict
subclasses - if true, evict instances of subclasses also
Since:
2.1

pin

void pin(java.lang.Object oid)
Pin the parameter instance in the second-level cache.

Parameters:
oid - the object id of the instance to pin.
Since:
2.0

pinAll

void pinAll(java.util.Collection oids)
Pin the parameter instances in the second-level cache.

Parameters:
oids - the object ids of the instances to pin.
Since:
2.0

pinAll

void pinAll(java.lang.Object... oids)
Pin the parameter instances in the second-level cache.

Parameters:
oids - the object ids of the instances to pin.
Since:
2.0

pinAll

void pinAll(java.lang.Class pcClass,
            boolean subclasses)
Deprecated. use pinAll (boolean subclasses, Class pcClass)

Pin instances in the second-level cache.

Parameters:
pcClass - the class of instances to pin
subclasses - if true, pin instances of subclasses also
Since:
2.0

pinAll

void pinAll(boolean subclasses,
            java.lang.Class pcClass)
Pin instances in the second-level cache.

Parameters:
pcClass - the class of instances to pin
subclasses - if true, pin instances of subclasses also
Since:
2.1

unpin

void unpin(java.lang.Object oid)
Unpin the parameter instance from the second-level cache.

Parameters:
oid - the object id of the instance to unpin.
Since:
2.0

unpinAll

void unpinAll(java.util.Collection oids)
Unpin the parameter instances from the second-level cache.

Parameters:
oids - the object ids of the instance to evict.
Since:
2.0

unpinAll

void unpinAll(java.lang.Object... oids)
Unpin the parameter instance from the second-level cache.

Parameters:
oids - the object id of the instance to evict.
Since:
2.0

unpinAll

void unpinAll(java.lang.Class pcClass,
              boolean subclasses)
Deprecated. use unpinAll(boolean subclasses, Class pcClass)

Unpin instances from the second-level cache.

Parameters:
pcClass - the class of instances to unpin
subclasses - if true, unpin instances of subclasses also
Since:
2.0

unpinAll

void unpinAll(boolean subclasses,
              java.lang.Class pcClass)
Unpin instances from the second-level cache.

Parameters:
pcClass - the class of instances to unpin
subclasses - if true, unpin instances of subclasses also
Since:
2.1


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