javax.cache.interceptor
Interface CacheKey

All Superinterfaces:
Serializable
All Known Implementing Classes:
DefaultCacheKey

public interface CacheKey
extends Serializable

A serializable, immutable, thread-safe object that can be used for a cache key.

The implementation MUST follow the java contract for Object.hashCode() and Object.equals(Object) to ensure correct behavior.

Since:
1.7
Author:
Eric Dalquist

Method Summary
 boolean equals(Object o)
          Compare this CacheKey with another.
 int hashCode()
          The immutable hash code of the object.
 

Method Detail

hashCode

int hashCode()
The immutable hash code of the object.

Overrides:
hashCode in class Object

equals

boolean equals(Object o)
Compare this CacheKey with another. If the two objects are equal their hashCode() values MUST be equal as well.

Overrides:
equals in class Object
Parameters:
o - The other object to compare to.
Returns:
true if the objects are equal


true