com.ibatis.sqlmap.engine.cache
Class CacheKey

java.lang.Object
  extended bycom.ibatis.sqlmap.engine.cache.CacheKey

public class CacheKey
extends java.lang.Object

Hash value generator for cache keys


Field Summary
private  long checksum
           
private  int count
           
private static int DEFAULT_HASHCODE
           
private static int DEFAULT_MULTIPLYER
           
private  int hashcode
           
private  int multiplier
           
 
Constructor Summary
CacheKey()
          Default constructor
CacheKey(int initialNonZeroOddNumber)
          Costructor that supplies an initial hashcode
CacheKey(int initialNonZeroOddNumber, int multiplierNonZeroOddNumber)
          Costructor that supplies an initial hashcode and multiplier
 
Method Summary
 boolean equals(java.lang.Object object)
           
 int hashCode()
           
 java.lang.String toString()
           
 CacheKey update(int x)
          Updates this object with new information based on an int value
 CacheKey update(java.lang.Object object)
          Updates this object with new information based on an object
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_MULTIPLYER

private static final int DEFAULT_MULTIPLYER
See Also:
Constant Field Values

DEFAULT_HASHCODE

private static final int DEFAULT_HASHCODE
See Also:
Constant Field Values

multiplier

private int multiplier

hashcode

private int hashcode

checksum

private long checksum

count

private int count
Constructor Detail

CacheKey

public CacheKey()
Default constructor


CacheKey

public CacheKey(int initialNonZeroOddNumber)
Costructor that supplies an initial hashcode

Parameters:
initialNonZeroOddNumber - - the hashcode to use

CacheKey

public CacheKey(int initialNonZeroOddNumber,
                int multiplierNonZeroOddNumber)
Costructor that supplies an initial hashcode and multiplier

Parameters:
initialNonZeroOddNumber - - the hashcode to use
multiplierNonZeroOddNumber - - the multiplier to use
Method Detail

update

public CacheKey update(int x)
Updates this object with new information based on an int value

Parameters:
x - - the int value
Returns:
the cache key

update

public CacheKey update(java.lang.Object object)
Updates this object with new information based on an object

Parameters:
object - - the object
Returns:
the cachekey

equals

public boolean equals(java.lang.Object object)

hashCode

public int hashCode()

toString

public java.lang.String toString()