uPortal 2.4.1
API Documentation

org.jasig.portal.concurrency.caching
Class ReferenceEntityCachingService

java.lang.Object
  extended byorg.jasig.portal.concurrency.caching.ReferenceEntityCachingService
All Implemented Interfaces:
IEntityCachingService

public class ReferenceEntityCachingService
extends java.lang.Object
implements IEntityCachingService

Caching service reference implementation.

Version:
$Revision: 1.10 $
Author:
Dan Ellentuck

Constructor Summary
ReferenceEntityCachingService()
          ReferenceEntityCachingService constructor comment.
 
Method Summary
 void add(IBasicEntity ent)
          Adds the entity to the cache.
 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.
 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.
static IEntityCachingService singleton()
           
 void update(IBasicEntity ent)
          Updates the entity in the cache and notifies peer caches.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceEntityCachingService

public ReferenceEntityCachingService()
                              throws CachingException
ReferenceEntityCachingService constructor comment.

Method Detail

add

public void add(IBasicEntity ent)
         throws CachingException
Adds the entity to the cache.

Specified by:
add in interface IEntityCachingService
Parameters:
ent - org.jasig.portal.IBasicEntity
Throws:
CachingException

get

public IBasicEntity get(java.lang.Class type,
                        java.lang.String key)
                 throws CachingException
Returns the cached entity identified by type and key.

Specified by:
get in interface IEntityCachingService
Parameters:
type - Class
key - String
Returns:
IBasicEntity entity
Throws:
CachingException

getCache

public IEntityCache getCache(java.lang.Class type)
                      throws CachingException
Returns the IEntityCache for type.

Parameters:
type - Class
Returns:
IEntityCache
Throws:
CachingException

newCache

public IEntityCache newCache(java.lang.Class type,
                             int maxSize,
                             int maxIdleTime,
                             int sweepInterval)
                      throws CachingException
Factory method returns a new instance of IEntityCache for type.

Parameters:
type - Class
maxSize - 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.
Returns:
IEntityCache
Throws:
CachingException

remove

public void remove(java.lang.Class type,
                   java.lang.String key)
            throws CachingException
Removes the cached entity identified by type and key from the cache and notifies peer caches.

Specified by:
remove in interface IEntityCachingService
Parameters:
type - Class
key - String
Throws:
CachingException

singleton

public static IEntityCachingService singleton()
                                       throws CachingException
Returns:
org.jasig.portal.concurrency.IEntityCachingService
Throws:
CachingException

update

public void update(IBasicEntity ent)
            throws CachingException
Updates the entity in the cache and notifies peer caches.

Specified by:
update in interface IEntityCachingService
Parameters:
ent - org.jasig.portal.IBasicEntity
Throws:
CachingException

uPortal 2.4.1
API Documentation