public interface Level2Cache extends Serializable
Modifier and Type | Interface and Description |
---|---|
static class |
Level2Cache.PinnedClass
Representation of a class whose objects will be pinned when put into the L2 cache.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Method to close the cache when no longer needed.
|
boolean |
containsOid(Object oid)
Accessor for whether an object with the specified id is in the cache
|
void |
evict(Object oid)
Evict the parameter instance from the second-level cache.
|
void |
evictAll()
Evict the parameter instances from the second-level cache.
|
void |
evictAll(Class pcClass,
boolean subclasses)
Evict the parameter instances from the second-level cache.
|
void |
evictAll(Collection oids)
Evict the parameter instances from the second-level cache.
|
void |
evictAll(Object[] oids)
Evict the parameter instances from the second-level cache.
|
CachedPC |
get(Object oid)
Accessor for an object from the cache.
|
Map<Object,CachedPC> |
getAll(Collection oids)
Accessor for a collection of objects from the cache.
|
int |
getNumberOfPinnedObjects()
Accessor for the number of pinned objects in the cache.
|
int |
getNumberOfUnpinnedObjects()
Accessor for the number of unpinned objects in the cache.
|
int |
getSize()
Accessor for the total number of objects in the L2 cache.
|
boolean |
isEmpty()
Accessor for whether the cache is empty.
|
void |
pin(Object oid)
Pin the parameter instance in the second-level cache.
|
void |
pinAll(Class pcClass,
boolean subclasses)
Pin instances in the second-level cache.
|
void |
pinAll(Collection oids)
Pin the parameter instances in the second-level cache.
|
void |
pinAll(Object[] oids)
Pin the parameter instances in the second-level cache.
|
CachedPC |
put(Object oid,
CachedPC pc)
Method to put an object in the cache.
|
void |
putAll(Map<Object,CachedPC> objs)
Method to put several objects into the cache.
|
void |
unpin(Object oid)
Unpin the parameter instance from the second-level cache.
|
void |
unpinAll(Class pcClass,
boolean subclasses)
Unpin instances from the second-level cache.
|
void |
unpinAll(Collection oids)
Unpin the parameter instances from the second-level cache.
|
void |
unpinAll(Object[] oids)
Unpin the parameter instance from the second-level cache.
|
void close()
void evict(Object oid)
oid
- the object id of the instance to evict.void evictAll()
void evictAll(Object[] oids)
oids
- the object ids of the instance to evict.void evictAll(Collection oids)
oids
- the object ids of the instance to evict.void evictAll(Class pcClass, boolean subclasses)
pcClass
- the class of instances to evictsubclasses
- if true, evict instances of subclasses alsovoid pin(Object oid)
oid
- the object id of the instance to pin.void pinAll(Collection oids)
oids
- the object ids of the instances to pin.void pinAll(Object[] oids)
oids
- the object ids of the instances to pin.void pinAll(Class pcClass, boolean subclasses)
pcClass
- the class of instances to pinsubclasses
- if true, pin instances of subclasses alsovoid unpin(Object oid)
oid
- the object id of the instance to unpin.void unpinAll(Collection oids)
oids
- the object ids of the instance to evict.void unpinAll(Object[] oids)
oids
- the object id of the instance to evict.void unpinAll(Class pcClass, boolean subclasses)
pcClass
- the class of instances to unpinsubclasses
- if true, unpin instances of subclasses alsoint getNumberOfPinnedObjects()
int getNumberOfUnpinnedObjects()
int getSize()
CachedPC get(Object oid)
oid
- The Object IDMap<Object,CachedPC> getAll(Collection oids)
oids
- The Object IDsCachedPC put(Object oid, CachedPC pc)
oid
- The Object id for this objectpc
- The L2 cacheable persistable objectvoid putAll(Map<Object,CachedPC> objs)
objs
- Map of cacheable object keyed by its oid.boolean isEmpty()
boolean containsOid(Object oid)
oid
- The object idCopyright © 2013. All rights reserved.