/*
 * JBoss, the OpenSource J2EE webOS
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package org.jboss.ejb3.cache;

import javax.ejb.EJBException;
import org.jboss.ejb3.Container;
import org.jboss.ejb3.stateful.StatefulBeanContext;

/**
 * Stateful StatelessBean Bean cache
 *
 * @author <a href="mailto:bill@jboss.org">Bill Burke</a>
 * @version $Revision: 1.2.2.3 $
 */
public interface StatefulCache
{
   /**
    * returns a key not the actual object
    */
   public StatefulBeanContext create();

   public StatefulBeanContext create(Class[] initTypes, Object[] initValues);

   public StatefulBeanContext get(Object key) throws EJBException;

   public void remove(Object key);

   public void finished(StatefulBeanContext ctx);

   public void initialize(Container container) throws Exception;

   void start();

   void stop();
}
