Interface GenericCacheKey<ClassT,ComponentT>
- Type Parameters:
ClassT
- The type of the actual implementation.ComponentT
- The type of the appended component data.
- All Known Implementing Classes:
CacheKey
,SerializableCacheKey
public interface GenericCacheKey<ClassT,ComponentT>
GenericCacheKey interface for providing access to tenant and principal data, as well as a list of appended
components.
-
Method Summary
Modifier and TypeMethodDescriptionappend
(Iterable<ComponentT> objects) Appends the given Objects to this instance.Getter for the list of additional cache key components.io.vavr.control.Option<String>
Getter for the name of the principal for which the key is used.io.vavr.control.Option<String>
Getter for the Id of the tenant for which the key is used.
-
Method Details
-
getComponents
Getter for the list of additional cache key components.- Returns:
- The list of additional cache key components.
-
getTenantId
Getter for the Id of the tenant for which the key is used.- Returns:
- The tenant identifier.
-
getPrincipalId
Getter for the name of the principal for which the key is used.- Returns:
- The principal identifier.
-
append
Appends the given Objects to this instance. In order to compare cache keys,Object.equals(Object)
andObject.hashCode()
are used. The given objects must not benull
.- Parameters:
objects
- Additional objects that should be used to identify a cache key.- Returns:
- This instance with the objects added.
- Throws:
IllegalArgumentException
- If any of the given objects isnull
.
-