Package dev.orne.beans
Class IdentityResolver.WeakHashMapCache
java.lang.Object
dev.orne.beans.IdentityResolver.WeakHashMapCache
- All Implemented Interfaces:
IdentityResolver.Cache
- Enclosing class:
- IdentityResolver
@API(status=INTERNAL,
since="0.1")
protected static class IdentityResolver.WeakHashMapCache
extends Object
implements IdentityResolver.Cache
Implementation of
Cache
based on WeakHashMap
.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returnstrue
if this instance contains an entry for the specified identity type.Returns the cached identity token resolution executable for the specified identity type, if any.void
put
(@NotNull Class<? extends Identity> key, Executable value) Puts the specified identity token resolution executable for the specified identity type.
-
Constructor Details
-
WeakHashMapCache
public WeakHashMapCache()Creates a new instance.
-
-
Method Details
-
contains
Returnstrue
if this instance contains an entry for the specified identity type.- Specified by:
contains
in interfaceIdentityResolver.Cache
- Parameters:
key
- The identity type- Returns:
- If this instance contains an entry for the identity type
-
get
Returns the cached identity token resolution executable for the specified identity type, if any.- Specified by:
get
in interfaceIdentityResolver.Cache
- Parameters:
key
- The identity type- Returns:
- The identity token resolution executable, or
null
if not cached o cache expired
-
put
Puts the specified identity token resolution executable for the specified identity type.- Specified by:
put
in interfaceIdentityResolver.Cache
- Parameters:
key
- The identity typevalue
- The identity token resolution executable
-