Interface ICacheKey

All Superinterfaces:
Cloneable, Serializable
All Known Subinterfaces:
IAliasKey

public interface ICacheKey extends Serializable, Cloneable
Title: Description: Copyright: Copyright (c) 2000 Company: The ICacheKey is the "key" to how the cache works. (HA HA) The first 3 keys..A,B and Name.. are combined to form the primary key using a hash algorithm. The secondKey is used when you need to cache multiple objects with the same primary key, for instance paging. You can also set the primary key directly, but then you run the risk of hash collisions. Using 2 of the 4 main fields is recommended to avoid collisions.
  • Method Details

    • setKeyA

      void setKeyA(int keyA) throws CacheException
      sets keyA
      Throws:
      CacheException - if primary key has been set
    • setKeyB

      void setKeyB(int keyB) throws CacheException
      sets keyB
      Throws:
      CacheException
    • setKeyName

      void setKeyName(String keyName) throws CacheException
      sets keyName limit of 100 ANSI characters
      Parameters:
      keyName - limit 100 ANSI chars
      Throws:
      CacheException
    • setSecondKey

      void setSecondKey(int skey)
      sets secondary key
      Parameters:
      skey - secondary key
    • setPrimaryKey

      void setPrimaryKey(int pkey)
      If you set primary key, then keys A,B and Name will be assumed to be 0/null and not used.
      Parameters:
      pkey - primary key
    • getKeyA

      int getKeyA()
      Returns:
      key A
    • getKeyB

      int getKeyB()
      Returns:
      key B
    • getKeyName

      String getKeyName()
      Returns:
      Name
    • getSecondKey

      int getSecondKey()
      Returns:
      secondary key
    • getPrimaryKey

      int getPrimaryKey()
      Returns:
      primary key
    • copy

      ICacheKey copy()
      create a new cache key
      Returns: