|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jasig.portal.concurrency.caching.ReferenceEntityCachingService
public class ReferenceEntityCachingService
Caching service reference implementation.
Field Summary | |
---|---|
private java.util.Map |
caches
|
(package private) int |
clockToleranceMillis
|
(package private) int |
defaultMaxCacheSize
|
(package private) int |
defaultMaxIdleTimeMillis
|
(package private) int |
defaultSweepIntervalMillis
|
(package private) boolean |
multiServer
|
private static IEntityCachingService |
singleton
|
Constructor Summary | |
---|---|
ReferenceEntityCachingService()
ReferenceEntityCachingService constructor comment. |
Method Summary | |
---|---|
void |
add(IBasicEntity ent)
Adds the entity to the cache. |
(package private) IEntityCache |
createCache(java.lang.Class type)
Create a cache for a specific entity type. |
private void |
createCaches()
Create a cache for each known entity type. |
IBasicEntity |
get(java.lang.Class type,
java.lang.String key)
Returns the cached entity identified by type and key. |
IEntityCache |
getCache(java.lang.Class type)
Returns the IEntityCache for type . |
protected java.util.Map |
getCaches()
|
private void |
initialize()
|
private void |
loadDefaultProperties()
Loads default properties applied to caches if not specifically overridden. |
IEntityCache |
newCache(java.lang.Class type,
int maxSize,
int maxIdleTime,
int sweepInterval)
Factory method returns a new instance of IEntityCache
for type . |
void |
remove(java.lang.Class type,
java.lang.String key)
Removes the cached entity identified by type and key from the cache and notifies peer caches. |
protected void |
setCaches(java.util.Map newCaches)
|
static IEntityCachingService |
singleton()
|
void |
update(IBasicEntity ent)
Updates the entity in the cache and notifies peer caches. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static IEntityCachingService singleton
private java.util.Map caches
boolean multiServer
int defaultMaxCacheSize
int defaultSweepIntervalMillis
int defaultMaxIdleTimeMillis
int clockToleranceMillis
Constructor Detail |
---|
public ReferenceEntityCachingService() throws CachingException
CachingException
Method Detail |
---|
public void add(IBasicEntity ent) throws CachingException
add
in interface IEntityCachingService
ent
- org.jasig.portal.IBasicEntity
CachingException
IEntityCache createCache(java.lang.Class type) throws CachingException
CachingException
private void createCaches() throws CachingException
CachingException
public IBasicEntity get(java.lang.Class type, java.lang.String key) throws CachingException
get
in interface IEntityCachingService
type
- Classkey
- String
CachingException
public IEntityCache getCache(java.lang.Class type) throws CachingException
IEntityCache
for type
.
type
- Class
CachingException
protected java.util.Map getCaches()
private void initialize() throws CachingException
CachingException
private void loadDefaultProperties()
public IEntityCache newCache(java.lang.Class type, int maxSize, int maxIdleTime, int sweepInterval) throws CachingException
IEntityCache
for type
.
type
- ClassmaxSize
- int - the maximum size of the cache.maxIdleTime
- int - the idle time in milliseconds after which a cache entry may be purged.sweepInterval
- int - the period of time in milliseconds between cache sweeps.
CachingException
public void remove(java.lang.Class type, java.lang.String key) throws CachingException
remove
in interface IEntityCachingService
type
- Classkey
- String
CachingException
protected void setCaches(java.util.Map newCaches)
newCaches
- java.util.Mappublic static IEntityCachingService singleton() throws CachingException
CachingException
public void update(IBasicEntity ent) throws CachingException
update
in interface IEntityCachingService
ent
- org.jasig.portal.IBasicEntity
CachingException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |