Package javax.jdo.datastore
Interface DataStoreCache
-
- All Known Implementing Classes:
DataStoreCache.EmptyDataStoreCache
public interface DataStoreCacheMany 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
Nested Classes Modifier and Type Interface Description static classDataStoreCache.EmptyDataStoreCacheThis class is an empty implementation of the DataStoreCache interface.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidevict(Object oid)Evict the parameter instance from the second-level cache.voidevictAll()Evict the parameter instances from the second-level cache.voidevictAll(boolean subclasses, Class pcClass)Evict the parameter instances from the second-level cache.voidevictAll(Object... oids)Evict the parameter instances from the second-level cache.voidevictAll(Collection oids)Evict the parameter instances from the second-level cache.voidpin(Object oid)Pin the parameter instance in the second-level cache.voidpinAll(boolean subclasses, Class pcClass)Pin instances in the second-level cache.voidpinAll(Object... oids)Pin the parameter instances in the second-level cache.voidpinAll(Collection oids)Pin the parameter instances in the second-level cache.voidunpin(Object oid)Unpin the parameter instance from the second-level cache.voidunpinAll(boolean subclasses, Class pcClass)Unpin instances from the second-level cache.voidunpinAll(Object... oids)Unpin the parameter instance from the second-level cache.voidunpinAll(Collection oids)Unpin the parameter instances from the second-level cache.
-
-
-
Method Detail
-
evict
void evict(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(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(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(boolean subclasses, Class pcClass)Evict the parameter instances from the second-level cache.- Parameters:
pcClass- the class of instances to evictsubclasses- if true, evict instances of subclasses also- Since:
- 2.1
-
pin
void pin(Object oid)
Pin the parameter instance in the second-level cache. This is a hint only, and will be ignored if the underlying cache doesn't support it.- Parameters:
oid- the object id of the instance to pin.- Since:
- 2.0
-
pinAll
void pinAll(Collection oids)
Pin the parameter instances in the second-level cache. This is a hint only, and will be ignored if the underlying cache doesn't support it.- Parameters:
oids- the object ids of the instances to pin.- Since:
- 2.0
-
pinAll
void pinAll(Object... oids)
Pin the parameter instances in the second-level cache. This is a hint only, and will be ignored if the underlying cache doesn't support it.- Parameters:
oids- the object ids of the instances to pin.- Since:
- 2.0
-
pinAll
void pinAll(boolean subclasses, Class pcClass)Pin instances in the second-level cache. This is a hint only, and will be ignored if the underlying cache doesn't support it.- Parameters:
pcClass- the class of instances to pinsubclasses- if true, pin instances of subclasses also- Since:
- 2.1
-
unpin
void unpin(Object oid)
Unpin the parameter instance from the second-level cache. This is a hint only, and will be ignored if the underlying cache doesn't support it.- Parameters:
oid- the object id of the instance to unpin.- Since:
- 2.0
-
unpinAll
void unpinAll(Collection oids)
Unpin the parameter instances from the second-level cache. This is a hint only, and will be ignored if the underlying cache doesn't support it.- Parameters:
oids- the object ids of the instance to evict.- Since:
- 2.0
-
unpinAll
void unpinAll(Object... oids)
Unpin the parameter instance from the second-level cache. This is a hint only, and will be ignored if the underlying cache doesn't support it.- Parameters:
oids- the object id of the instance to evict.- Since:
- 2.0
-
unpinAll
void unpinAll(boolean subclasses, Class pcClass)Unpin instances from the second-level cache. This is a hint only, and will be ignored if the underlying cache doesn't support it.- Parameters:
pcClass- the class of instances to unpinsubclasses- if true, unpin instances of subclasses also- Since:
- 2.1
-
-