org.tigris.scarab.services.cache
Class ScarabCacheKey

java.lang.Object
  extended byorg.tigris.scarab.services.cache.ScarabCacheKey
All Implemented Interfaces:
org.apache.fulcrum.pool.Recyclable, java.io.Serializable

public class ScarabCacheKey
extends java.lang.Object
implements java.io.Serializable, org.apache.fulcrum.pool.Recyclable

Version:
$Id: ScarabCacheKey.java 9255 2004-11-14 21:07:04Z dep4b $
Author:
John McNally
See Also:
Serialized Form

Constructor Summary
ScarabCacheKey()
           
ScarabCacheKey(java.io.Serializable[] moreThanThree)
           
ScarabCacheKey(java.io.Serializable instanceOrClass, java.lang.String method)
           
ScarabCacheKey(java.io.Serializable instanceOrClass, java.lang.String method, java.io.Serializable arg1)
           
ScarabCacheKey(java.io.Serializable instanceOrClass, java.lang.String method, java.io.Serializable arg1, java.io.Serializable arg2)
           
ScarabCacheKey(java.io.Serializable instanceOrClass, java.lang.String method, java.io.Serializable arg1, java.io.Serializable arg2, java.io.Serializable arg3)
           
 
Method Summary
 void dispose()
          Disposes the object after use.
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 void init(java.io.Serializable[] keys)
          Initialize key for method with more than two arguments.
 void init(java.io.Serializable instanceOrClass, java.lang.String method)
          Initialize key for method with no arguments.
 void init(java.io.Serializable instanceOrClass, java.lang.String method, java.io.Serializable arg1)
          Initialize key for method with one argument.
 void init(java.io.Serializable instanceOrClass, java.lang.String method, java.io.Serializable arg1, java.io.Serializable arg2)
          Initialize key for method with two arguments.
 void init(java.io.Serializable instanceOrClass, java.lang.String method, java.io.Serializable arg1, java.io.Serializable arg2, java.io.Serializable arg3)
          Initialize key for method with two arguments.
 boolean isDisposed()
          Checks whether the object is disposed.
 void recycle()
          Recycles the object by removing its disposed flag.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScarabCacheKey

public ScarabCacheKey()

ScarabCacheKey

public ScarabCacheKey(java.io.Serializable instanceOrClass,
                      java.lang.String method)

ScarabCacheKey

public ScarabCacheKey(java.io.Serializable instanceOrClass,
                      java.lang.String method,
                      java.io.Serializable arg1)

ScarabCacheKey

public ScarabCacheKey(java.io.Serializable instanceOrClass,
                      java.lang.String method,
                      java.io.Serializable arg1,
                      java.io.Serializable arg2)

ScarabCacheKey

public ScarabCacheKey(java.io.Serializable instanceOrClass,
                      java.lang.String method,
                      java.io.Serializable arg1,
                      java.io.Serializable arg2,
                      java.io.Serializable arg3)

ScarabCacheKey

public ScarabCacheKey(java.io.Serializable[] moreThanThree)
Method Detail

init

public void init(java.io.Serializable instanceOrClass,
                 java.lang.String method)
Initialize key for method with no arguments.

Parameters:
instanceOrClass - the Object on which the method is invoked. if the method is static, a String representing the class name is used.
method - the method name

init

public void init(java.io.Serializable instanceOrClass,
                 java.lang.String method,
                 java.io.Serializable arg1)
Initialize key for method with one argument.

Parameters:
instanceOrClass - the Object on which the method is invoked. if the method is static, a String representing the class name is used.
method - the method name
arg1 - first method arg, may be null

init

public void init(java.io.Serializable instanceOrClass,
                 java.lang.String method,
                 java.io.Serializable arg1,
                 java.io.Serializable arg2)
Initialize key for method with two arguments.

Parameters:
instanceOrClass - the Object on which the method is invoked. if the method is static, a String representing the class name is used.
method - the method name
arg1 - first method arg, may be null
arg2 - second method arg, may be null

init

public void init(java.io.Serializable instanceOrClass,
                 java.lang.String method,
                 java.io.Serializable arg1,
                 java.io.Serializable arg2,
                 java.io.Serializable arg3)
Initialize key for method with two arguments.

Parameters:
instanceOrClass - the Object on which the method is invoked. if the method is static, a String representing the class name is used.
method - the method name
arg1 - first method arg, may be null
arg2 - second method arg, may be null

init

public void init(java.io.Serializable[] keys)
Initialize key for method with more than two arguments.

Parameters:
keys - Serializable[] where [0]=>the Object on which the method is invoked if the method is static, a String representing the class name is used. [1]=>the method name [n] where n>1 are the method arguments

equals

public boolean equals(java.lang.Object obj)

hashCode

public int hashCode()

recycle

public void recycle()
Recycles the object by removing its disposed flag.

Specified by:
recycle in interface org.apache.fulcrum.pool.Recyclable

dispose

public void dispose()
Disposes the object after use. The method is called when the object is returned to its pool. The dispose method must call its super.

Specified by:
dispose in interface org.apache.fulcrum.pool.Recyclable

isDisposed

public boolean isDisposed()
Checks whether the object is disposed.

Specified by:
isDisposed in interface org.apache.fulcrum.pool.Recyclable
Returns:
true, if the object is disposed.


Copyright © 2000-2004 Tigris.org. All Rights Reserved.