org.jasig.portal.concurrency
Interface IEntityCache

All Known Implementing Classes:
MapBackedEntityCache

public interface IEntityCache

Defines the api for a cache that caches IBasicEntities of a single type.

Version:
$Revision: 19776 $
Author:
Dan Ellentuck

Method Summary
 void add(IBasicEntity entity)
           
 void cleanupCache()
          Deprecated. This is the responsibility of the cache or cache manager code
 void clearCache()
          Remove all entries from the cache.
 IBasicEntity get(String key)
           
 Class<? extends IBasicEntity> getEntityType()
           
 void remove(String entityKey)
           
 int size()
          Answers the number of entries in the cache.
 void update(IBasicEntity entity)
           
 

Method Detail

add

void add(IBasicEntity entity)
         throws CachingException
Parameters:
entity - - the entity to be cached.
Throws:
CachingException

cleanupCache

@Deprecated
void cleanupCache()
                  throws CachingException
Deprecated. This is the responsibility of the cache or cache manager code

Purge stale entries from the cache.

Throws:
CachingException

clearCache

void clearCache()
                throws CachingException
Remove all entries from the cache.

Throws:
CachingException

get

IBasicEntity get(String key)
Parameters:
key - the key of the entity.
Returns:
org.jasig.portal.concurrency.IBasicEntity

getEntityType

Class<? extends IBasicEntity> getEntityType()
Returns:
java.lang.Class
See Also:
for known types.

remove

void remove(String entityKey)
            throws CachingException
Parameters:
entityKey - - the key of the entity to be un-cached.
Throws:
CachingException

size

int size()
Answers the number of entries in the cache. May return -1 if the cache does not make this information avaialble


update

void update(IBasicEntity entity)
            throws CachingException
Parameters:
entity - - the entity to be updated in the cache.
Throws:
CachingException


Copyright © 2010 Jasig. All Rights Reserved.