rabbit.cache
Class MemoryKey

java.lang.Object
  extended by rabbit.cache.MemoryKey
All Implemented Interfaces:
java.io.Serializable

public class MemoryKey
extends java.lang.Object

A key to use when searching the cache.

See Also:
Serialized Form

Field Summary
protected  NCache cache
           
protected  int hashCode
           
 
Constructor Summary
MemoryKey(java.lang.Object data)
           
 
Method Summary
 boolean equals(java.lang.Object data)
          Check if the given object is equal to the contained key.
 java.lang.Object getData()
          Get the actual key object.
 java.lang.Object getData(NCache cache, NCacheEntry entry)
          Get the hooked data.
protected  java.lang.String getExtension()
           
 long getId()
          Get the unique id for this object.
 int hashCode()
          Get the hashCode for the contained key object.
protected  java.lang.Object readHook(NCache cache, NCacheEntry entry)
          Read the hooked data.
protected  java.lang.Object readHook(java.lang.String name)
          Read the hooked data.
protected  void setCache(NCache cache)
           
protected  void storeHook(NCache cache, NCacheEntry entry, java.lang.Object hook)
          Set the hooked data.
protected  void storeKey(NCache cache, NCacheEntry entry, java.lang.Object key)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

hashCode

protected int hashCode

cache

protected transient NCache cache
Constructor Detail

MemoryKey

public MemoryKey(java.lang.Object data)
Method Detail

getData

public java.lang.Object getData()
Get the actual key object.


getExtension

protected java.lang.String getExtension()

setCache

protected void setCache(NCache cache)

storeKey

protected void storeKey(NCache cache,
                        NCacheEntry entry,
                        java.lang.Object key)

hashCode

public int hashCode()
Get the hashCode for the contained key object.

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object data)
Check if the given object is equal to the contained key.

Overrides:
equals in class java.lang.Object

getId

public long getId()
Get the unique id for this object.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getData

public java.lang.Object getData(NCache cache,
                                NCacheEntry entry)
Get the hooked data.


readHook

protected java.lang.Object readHook(NCache cache,
                                    NCacheEntry entry)
Read the hooked data.


readHook

protected java.lang.Object readHook(java.lang.String name)
Read the hooked data.


storeHook

protected void storeHook(NCache cache,
                         NCacheEntry entry,
                         java.lang.Object hook)
Set the hooked data.