org.objectweb.speedo.usercache.api
Interface UserCacheManager

All Known Subinterfaces:
SpeedoHome
All Known Implementing Classes:
SpeedoHomeImpl

public interface UserCacheManager

Defines a Manager of a set of user caches. It permits to initalizes user caches. Each user cache is identifier by an int value. The particular '-1' value represents no user cache.

Author:
S.Chassande-Barrioz

Method Summary
 boolean activeUserCache(java.lang.String cacheName)
          Initializes the user cache
 java.util.Collection getActiveUserCache()
          Retrieves the list of user cache which has been initialized.
 UserCache getUserCache(java.util.Collection fieldNames)
          Retrieves the name of the user cache which index is exactly composed by some field names.
 UserCache getUserCache(int cacheId)
          Retrives a user cache
 void userCacheEntryUnbound(java.lang.Object oid)
          An entry of user cache has been unbound from the real cache.
 

Method Detail

getUserCache

public UserCache getUserCache(int cacheId)
Retrives a user cache

Parameters:
cacheId - is the identifier of the asked user cache
Returns:
the user cache instance if found, null otherwise

getUserCache

public UserCache getUserCache(java.util.Collection fieldNames)
Retrieves the name of the user cache which index is exactly composed by some field names.

Parameters:
fieldNames - is the collection of field names (String). The order of the collection is not important here.
Returns:
an user cache name if it has been found, null otherwise.

getActiveUserCache

public java.util.Collection getActiveUserCache()
Retrieves the list of user cache which has been initialized.

Returns:
a collection of UserCache instance

userCacheEntryUnbound

public void userCacheEntryUnbound(java.lang.Object oid)
An entry of user cache has been unbound from the real cache. A typical implementation, undinds from active user caches, the entry. To do this the a persistent object which has been previously unexported.

Parameters:
oid - is the identifier of the persistent object to unbind

activeUserCache

public boolean activeUserCache(java.lang.String cacheName)
Initializes the user cache

Parameters:
cacheName - is the name of the user cache to initialize
Returns:
indicates if the cache has been initialized correctly