|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.portal.services.EntityCachingService
IEntityCachingService bean should be injected instead of using this lookup class.
@Deprecated public class EntityCachingService
This class presents a facade for the IEntityCachingService implementation
that lets clients cache and retrieve IBasicEntities. It
hides such details as the physical structure of the cache and whether
it is running in a multi- or single-JVM environment.
An IBasicEntity can answer its type and key. (See
org.jasig.portal.groups.EntityTypes).
Caching consists of asking the service to add, retrieve, update and remove elements from the cache, e.g.,
// Retrieve the entity from its store:
Class type = getEntityClass();
String key = getEntityKey();
IBasicEntity ent = findEntity(key);
...
// Cache the entity:
EntityCachingService.add(ent);
...
// Retrieve the entity from the cache:
IEntity aCopy = EntityCachingService.get(type, key);
...
// Update the entity and then:
EntityCachingService..update(aCopy); // notifies peer caches.
...
// Or delete the entity and:
EntityCachingService.remove(type, key); // notifies peer caches.
| Method Summary | |
|---|---|
void |
add(IBasicEntity ent)
Deprecated. Adds the entity to the cache. |
IBasicEntity |
get(Class<? extends IBasicEntity> type,
String key)
Deprecated. Returns the cached entity identified by type and key. |
IBasicEntity |
get(EntityIdentifier entityID)
Deprecated. Returns the cached entity referred to by entityID. |
static IEntityCachingService |
getEntityCachingService()
Deprecated. |
static EntityCachingService |
instance()
Deprecated. Use getEntityCachingService() instead. |
void |
remove(Class<? extends IBasicEntity> type,
String key)
Deprecated. Removes the entity identified by type and key from the cache and notifies peer caches. |
void |
remove(EntityIdentifier entityID)
Deprecated. Removes the entity referred to by entityID from the cache and notifies peer caches. |
void |
remove(IBasicEntity ent)
Deprecated. Removes the IBasicEntity from the cache and notifies peer
caches. |
void |
update(IBasicEntity ent)
Deprecated. 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 |
| Method Detail |
|---|
@Deprecated
public static EntityCachingService instance()
throws CachingException
getEntityCachingService() instead.
CachingExceptionpublic static IEntityCachingService getEntityCachingService()
public void add(IBasicEntity ent)
throws CachingException
add in interface IEntityCachingServiceent - org.jasig.portal.IBasicEntity
CachingException
public IBasicEntity get(Class<? extends IBasicEntity> type,
String key)
throws CachingException
get in interface IEntityCachingServicetype - Classkey - String
CachingException
public IBasicEntity get(EntityIdentifier entityID)
throws CachingException
entityID - entity identifier
CachingException
public void remove(Class<? extends IBasicEntity> type,
String key)
throws CachingException
remove in interface IEntityCachingServicetype - Classkey - String
CachingException
public void remove(EntityIdentifier entityID)
throws CachingException
entityID -
CachingException
public void remove(IBasicEntity ent)
throws CachingException
IBasicEntity from the cache and notifies peer
caches.
ent - org.jasig.portal.IBasicEntity
CachingException
public void update(IBasicEntity ent)
throws CachingException
update in interface IEntityCachingServiceent - org.jasig.portal.concurrency.IBasicEntity
CachingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||