User: fleury  
  Date: 00/08/24 19:20:41

  Modified:    src/main/org/jboss/util FastKey.java
  Log:
  update to fastkey, externalizable
  
  Revision  Changes    Path
  1.7       +22 -21    jboss/src/main/org/jboss/util/FastKey.java
  
  Index: FastKey.java
  ===================================================================
  RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/util/FastKey.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- FastKey.java      2000/08/17 19:08:34     1.6
  +++ FastKey.java      2000/08/25 02:20:40     1.7
  @@ -6,6 +6,8 @@
   */
   package org.jboss.util;
   
  +
  +import org.jboss.ejb.CacheKey;
   /**
   *   FastKey
   * 
  @@ -16,21 +18,18 @@
   *   
   *   @see org.jboss.ejb.plugins.NoPassivationInstanceCache.java
   *   @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
  -*   @version $Revision: 1.6 $
  +*   @version $Revision: 1.7 $
   */
   public class FastKey
  -    implements java.io.Externalizable
  +     extends CacheKey
  +     implements java.io.Externalizable
   {
       // Constants -----------------------------------------------------
       
       // Attributes ----------------------------------------------------
  -    
  -    // The fastKey that identifies the association between EJBObject and context
  -    public Long fastKey;
  -    
  -    // The id that the instance holding this fastKey is supposed to represent (DB)
  -    public Object id;
  -    
  +  
  +     protected Long fastKey;
  +     
       // Static --------------------------------------------------------  
       
       // The seed for the fastKey id
  @@ -41,21 +40,23 @@
       
       
       // Constructors --------------------------------------------------
  -    
  -    public FastKey() {
  -        // For externalization    
  -    }
  -    
  -    public FastKey(Object id) {
  -        
  -        fastKey = nextFastKey();
  -        
  -        this.id = id;
  -    }
  -    
       
  +     public FastKey() {
  +             
  +             // For externalization only             
  +     }
  +     
  +     public FastKey(Object id) {
  +             super(id);
  +             // The FastKey is based on a counter
  +             this.fastKey = nextFastKey();
  +     }
       // Public --------------------------------------------------------
       
  +     public Object getPrimaryKey() {
  +             
  +             return id;
  +     }
       
       
       // Z implementation ----------------------------------------------
  
  
  

Reply via email to