org.jboss.ejb3.cache.impl
Class GroupedPassivatingCacheImpl<T extends Identifiable & Serializable>

java.lang.Object
  extended by org.jboss.ejb3.cache.impl.GroupedPassivatingCacheImpl<T>
All Implemented Interfaces:
Cache<T>, GroupedPassivatingCache<T>, PassivatingCache<T>

public class GroupedPassivatingCacheImpl<T extends Identifiable & Serializable>
extends Object
implements GroupedPassivatingCache<T>

Comment

Version:
$Revision: 69058 $
Author:
Carlo de Wolf

Nested Class Summary
protected  class GroupedPassivatingCacheImpl.Entry
           
 
Constructor Summary
GroupedPassivatingCacheImpl(StatefulObjectFactory<T> factory, PassivationManager<T> passivationManager, ObjectStore<T> store, PassivatingCache<PassivationGroup> groupCache)
           
 
Method Summary
 T create(Class<?>[] initTypes, Object[] initValues)
          Create a new object.
 T get(Object key)
          Get the specified object from cache.
 void passivate(Object key)
          Force passivation of an object.
 T peek(Object key)
          Peek at an object which might be in use.
 void release(T obj)
          Release the object from use.
 void remove(Object key)
          Remove the specified object from cache.
 void setGroup(T obj, PassivationGroup group)
           
 void setName(String name)
           
 void setSessionTimeout(int sessionTimeout)
           
 void start()
          Start the cache.
 void stop()
          Stop the cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupedPassivatingCacheImpl

public GroupedPassivatingCacheImpl(StatefulObjectFactory<T> factory,
                                   PassivationManager<T> passivationManager,
                                   ObjectStore<T> store,
                                   PassivatingCache<PassivationGroup> groupCache)
Method Detail

passivate

public void passivate(Object key)
Description copied from interface: PassivatingCache
Force passivation of an object. The object must not be in use.

Specified by:
passivate in interface PassivatingCache<T extends Identifiable & Serializable>
Parameters:
key - the identifier of the object

create

public T create(Class<?>[] initTypes,
                Object[] initValues)
Description copied from interface: Cache
Create a new object.

Specified by:
create in interface Cache<T extends Identifiable & Serializable>
Returns:

get

public T get(Object key)
                                         throws javax.ejb.NoSuchEJBException
Description copied from interface: Cache
Get the specified object from cache. This will mark the object as being in use.

Specified by:
get in interface Cache<T extends Identifiable & Serializable>
Parameters:
key - the identifier of the object
Returns:
the object
Throws:
javax.ejb.NoSuchEJBException - if the object does not exist

peek

public T peek(Object key)
                                          throws javax.ejb.NoSuchEJBException
Description copied from interface: Cache
Peek at an object which might be in use.

Specified by:
peek in interface Cache<T extends Identifiable & Serializable>
Parameters:
key - the identifier of the object
Returns:
the object
Throws:
javax.ejb.NoSuchEJBException - if the object does not exist

release

public void release(T obj)
Description copied from interface: Cache
Release the object from use.

Specified by:
release in interface Cache<T extends Identifiable & Serializable>
Parameters:
obj - the object

remove

public void remove(Object key)
Description copied from interface: Cache
Remove the specified object from cache.

Specified by:
remove in interface Cache<T extends Identifiable & Serializable>
Parameters:
key - the identifier of the object

setGroup

public void setGroup(T obj,
                     PassivationGroup group)
Specified by:
setGroup in interface GroupedPassivatingCache<T extends Identifiable & Serializable>

setName

public void setName(String name)

setSessionTimeout

public void setSessionTimeout(int sessionTimeout)

start

public void start()
Description copied from interface: Cache
Start the cache.

Specified by:
start in interface Cache<T extends Identifiable & Serializable>

stop

public void stop()
Description copied from interface: Cache
Stop the cache.

Specified by:
stop in interface Cache<T extends Identifiable & Serializable>


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