public class NullLevel2Cache extends AbstractLevel2Cache
Level2Cache.PinnedClass
cacheName, clearAtClose, maxSize, nucleusCtx, timeout
Constructor and Description |
---|
NullLevel2Cache(NucleusContext nucleusCtx) |
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
|
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)
Evict the parameter instances from 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 L2 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 instances from the second-level cache.
|
getAll, putAll
public NullLevel2Cache(NucleusContext nucleusCtx)
public void close()
public void evict(Object oid)
oid
- the object id of the instance to evict.public void evictAll()
public void evictAll(Class pcClass, boolean subclasses)
pcClass
- the class to evictsubclasses
- Whether to evict all subclasses of this class alsopublic void evictAll(Collection oids)
oids
- the object ids of the instance to evict.public void evictAll(Object[] oids)
oids
- the object ids of the instances to evictpublic void pin(Object oid)
pin
in interface Level2Cache
pin
in class AbstractLevel2Cache
oid
- the object id of the instance to pin.public void pinAll(Class pcClass, boolean subclasses)
pinAll
in interface Level2Cache
pinAll
in class AbstractLevel2Cache
pcClass
- the class of instances to evictsubclasses
- if true, evict instances of subclasses alsopublic void pinAll(Collection oids)
pinAll
in interface Level2Cache
pinAll
in class AbstractLevel2Cache
oids
- the object ids of the instances to pin.public void pinAll(Object[] oids)
pinAll
in interface Level2Cache
pinAll
in class AbstractLevel2Cache
oids
- the object ids of the instances to pin.public void unpin(Object oid)
unpin
in interface Level2Cache
unpin
in class AbstractLevel2Cache
oid
- the object id of the instance to unpin.public void unpinAll(Class pcClass, boolean subclasses)
unpinAll
in interface Level2Cache
unpinAll
in class AbstractLevel2Cache
pcClass
- the class of instances to unpinsubclasses
- if true, unpin instances of subclasses alsopublic void unpinAll(Collection oids)
unpinAll
in interface Level2Cache
unpinAll
in class AbstractLevel2Cache
oids
- the object ids of the instance to evict.public void unpinAll(Object[] oids)
unpinAll
in interface Level2Cache
unpinAll
in class AbstractLevel2Cache
oids
- the object ids of the instance to evict.public boolean containsOid(Object oid)
oid
- The object idpublic CachedPC get(Object oid)
oid
- The identitypublic int getNumberOfPinnedObjects()
Level2Cache
getNumberOfPinnedObjects
in interface Level2Cache
getNumberOfPinnedObjects
in class AbstractLevel2Cache
Level2Cache.getNumberOfPinnedObjects()
public int getNumberOfUnpinnedObjects()
Level2Cache
getNumberOfUnpinnedObjects
in interface Level2Cache
getNumberOfUnpinnedObjects
in class AbstractLevel2Cache
Level2Cache.getNumberOfUnpinnedObjects()
public int getSize()
Level2Cache
Level2Cache.getSize()
public boolean isEmpty()
AbstractLevel2Cache
isEmpty
in interface Level2Cache
isEmpty
in class AbstractLevel2Cache
Level2Cache.isEmpty()
Copyright © 2017. All rights reserved.