User: oberg   
  Date: 00/12/01 05:06:29

  Modified:    src/main/org/jboss/ejb InstanceCache.java
                        EntityInstanceCache.java
  Log:
  Added isActive method for fBPK optimization
  
  Revision  Changes    Path
  1.5       +42 -52    jboss/src/main/org/jboss/ejb/InstanceCache.java
  
  Index: InstanceCache.java
  ===================================================================
  RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/ejb/InstanceCache.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- InstanceCache.java        2000/10/16 23:37:26     1.4
  +++ InstanceCache.java        2000/12/01 13:06:28     1.5
  @@ -14,73 +14,63 @@
    *      
    *   @author Rickard �berg ([EMAIL PROTECTED])
    *  @author Simone Bordet ([EMAIL PROTECTED])
  - *   @version $Revision: 1.4 $
  + *   @version $Revision: 1.5 $
    */
   public interface InstanceCache
      extends ContainerPlugin
   {
  -   // Constants -----------------------------------------------------
  -    
  -   // Attributes ----------------------------------------------------
  -    
  -   // Static --------------------------------------------------------
  -   
  -   // Constructors --------------------------------------------------
  -   
  -   // Public --------------------------------------------------------
  -
      /**
  -    *   Gets a bean instance from this cache given the identity.
  -    *   This method may involve activation if the instance is not in the cache.
  -    *        Implementation should have O(1) complexity.
  -    *   This method is never called for stateless session beans.
  -    *
  -    * @param id the primary key of the bean 
  -    * @return the EnterpriseContext related to the given id
  -    * @exception RemoteException in case of illegal calls (concurrent / reentrant),
  -     *                        NoSuchObjectException if the bean cannot be found.
  -     * @see #release  
  -    */
  +   *   Gets a bean instance from this cache given the identity.
  +   *   This method may involve activation if the instance is not in the cache.
  +   * Implementation should have O(1) complexity.
  +   *   This method is never called for stateless session beans.
  +   *
  +   * @param id the primary key of the bean 
  +   * @return the EnterpriseContext related to the given id
  +   * @exception RemoteException in case of illegal calls (concurrent / reentrant),
  +   *                  NoSuchObjectException if the bean cannot be found.
  +   * @see #release  
  +   */
      public EnterpriseContext get(Object id)
  -      throws RemoteException, NoSuchObjectException;
  +   throws RemoteException, NoSuchObjectException;
   
      /**
  -    *   Inserts an active bean instance after creation or activation. 
  -     *       Implementation should guarantee proper locking and O(1) complexity.
  -    *
  -    * @param ctx the EnterpriseContext to insert in the cache
  -     * @see #remove
  -    */
  +   *   Inserts an active bean instance after creation or activation. 
  +   *         Implementation should guarantee proper locking and O(1) complexity.
  +   *
  +   * @param ctx the EnterpriseContext to insert in the cache
  +   * @see #remove
  +   */
      public void insert(EnterpriseContext ctx);
   
      /**
  -    *   Releases the given bean instance from this cache.
  -     *       This method may passivate the bean to get it out of the cache.
  -     *       Implementation should return almost immediately leaving the
  -     *       passivation to be executed by another thread.
  -    *
  -    * @param ctx the EnterpriseContext to release
  -     * @see #get
  -    */
  +   *   Releases the given bean instance from this cache.
  +   * This method may passivate the bean to get it out of the cache.
  +   * Implementation should return almost immediately leaving the
  +   * passivation to be executed by another thread.
  +   *
  +   * @param ctx the EnterpriseContext to release
  +   * @see #get
  +   */
      public void release(EnterpriseContext ctx);
   
      /**
  -    *   Removes a bean instance from this cache given the identity.
  -     *       Implementation should have O(1) complexity and guarantee proper 
locking.
  -    *
  -    * @param id the pimary key of the bean
  -     * @see #insert
  -    */
  +   *   Removes a bean instance from this cache given the identity.
  +   * Implementation should have O(1) complexity and guarantee proper locking.
  +   *
  +   * @param id the pimary key of the bean
  +   * @see #insert
  +   */
      public void remove(Object id);
  -   
  -   // Z implementation ----------------------------------------------
  -    
  -   // Package protected ---------------------------------------------
  -    
  -   // Protected -----------------------------------------------------
  -    
  -   // Private -------------------------------------------------------
   
  -   // Inner classes -------------------------------------------------
  +   /**
  +   *   Checks whether an instance corresponding to a particular id is active
  +   *
  +   * @param id the pimary key of the bean
  +   * @see #insert
  +   */
  +   public boolean isActive(Object id);
  +   
   }
  +
   
  
  
  
  1.2       +1 -11     jboss/src/main/org/jboss/ejb/EntityInstanceCache.java
  
  Index: EntityInstanceCache.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/EntityInstanceCache.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EntityInstanceCache.java  2000/08/25 01:48:27     1.1
  +++ EntityInstanceCache.java  2000/12/01 13:06:28     1.2
  @@ -18,21 +18,11 @@
    * 
    *   @see NoPassivationEntityInstanceCache.java    
    *   @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
  - *   @version $Revision: 1.1 $
  + *   @version $Revision: 1.2 $
    */
   public interface EntityInstanceCache
      extends InstanceCache
   {
  -   // Constants -----------------------------------------------------
  -    
  -   // Attributes ----------------------------------------------------
  -    
  -   // Static --------------------------------------------------------
  -   
  -   // Constructors --------------------------------------------------
  -   
  -   // Public --------------------------------------------------------
  -
      /**
       * Returns the key used to cache the context
        *
  
  
  

Reply via email to