org.jboss.cache.search
Class CacheEntityLoader

java.lang.Object
  extended by org.jboss.cache.search.CacheEntityLoader

public class CacheEntityLoader
extends Object

Class that is used to load objects from a list of CacheEntityId ids.

Author:
Navin Surtani (nsurtani@redhat.com)

Constructor Summary
CacheEntityLoader(org.jboss.cache.Cache cache)
           
 
Method Summary
 Object load(CacheEntityId id)
          Takes a list of entity ids and gets them from the cache.
 List<Object> load(List<CacheEntityId> ids)
          Takes a list of entity ids and gets them from the cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CacheEntityLoader

public CacheEntityLoader(org.jboss.cache.Cache cache)
Method Detail

load

public List<Object> load(List<CacheEntityId> ids)
Takes a list of entity ids and gets them from the cache.

Parameters:
ids - list of cache entity IDs. Cannot be null.
Returns:
List of objects loaded from the cache. The list returned will be exactly the same size as the ids list passed in.
Throws:
NullPointerException - if ids is null.

load

public Object load(CacheEntityId id)
Takes a list of entity ids and gets them from the cache.

Parameters:
id - cache entity id to look up in the cache.
Returns:
the object from the cache, or null if one cannot be found.
Throws:
NullPointerException - if ids is null.


Copyright © 2008 JBoss, a division of Red Hat. All Rights Reserved.