Package org.jvnet.hk2.internal
Class CacheKey
java.lang.Object
org.jvnet.hk2.internal.CacheKey
This is the cache key, which encapsulates very specific lookup queries.
The point of this is to be useable as the key in a hash map, so that
equals and hashCode must work properly
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
Pre-calculated in order to improve hashMap lookupsprivate final Type
private final String
private final Annotation[]
private final String
private final Unqualified
-
Constructor Summary
ConstructorsConstructorDescriptionCacheKey
(Type lookupType, String name, Unqualified unqualified, Annotation... qualifiers) Key used for LRU cache -
Method Summary
-
Field Details
-
removalName
-
lookupType
-
name
-
qualifiers
-
unqualified
-
hashCode
private final int hashCodePre-calculated in order to improve hashMap lookups
-
-
Constructor Details
-
CacheKey
Key used for LRU cache- Parameters:
lookupType
- The type in the lookup callname
- The name in the lookup callqualifiers
- The set of qualifiers being looked up
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
matchesRemovalName
Used when bulk removing a contract that has been removed from the system- Parameters:
name
- The name of the contract that has been removed from the system- Returns:
- true if this CacheKey is associated with the name contract, and should thus be removed
-
toString
-