Class CooldownRepository.CacheCooldownRepository<K>
java.lang.Object
org.incendo.cloud.processors.cooldown.CooldownRepository.AbstractCooldownRepository<K>
org.incendo.cloud.processors.cooldown.CooldownRepository.CacheCooldownRepository<K>
- All Implemented Interfaces:
CooldownRepository<K>
- Enclosing interface:
- CooldownRepository<K>
public static final class CooldownRepository.CacheCooldownRepository<K>
extends CooldownRepository.AbstractCooldownRepository<K>
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.incendo.cloud.processors.cooldown.CooldownRepository
CooldownRepository.AbstractCooldownRepository<K>, CooldownRepository.CacheCooldownRepository<K>, CooldownRepository.MapCooldownRepository<K>, CooldownRepository.MappingCooldownRepository<C,K> -
Method Summary
Modifier and TypeMethodDescriptionvoiddeleteProfile(@NonNull K key) Deletes the profile identified by the givenkey.getProfile(@NonNull K key, @NonNull CooldownProfileFactory profileFactory) Returns the profile for the givenkey.getProfileIfExists(@NonNull K key) Returns the profile for the givenkey, if it exists.Methods inherited from class org.incendo.cloud.processors.cooldown.CooldownRepository.AbstractCooldownRepository
deleteCooldown
-
Method Details
-
getProfile
public @NonNull CooldownProfile getProfile(@NonNull K key, @NonNull CooldownProfileFactory profileFactory) Description copied from interface:CooldownRepositoryReturns the profile for the givenkey.If no profile exists in the repository, a new profile will be persisted and returned.
- Parameters:
key- key that identifies the profileprofileFactory- factory that creates profiles- Returns:
- the profile
-
getProfileIfExists
Description copied from interface:CooldownRepositoryReturns the profile for the givenkey, if it exists.- Parameters:
key- key that identifies the profile- Returns:
- the profile, or
null
-
deleteProfile
Description copied from interface:CooldownRepositoryDeletes the profile identified by the givenkey.- Parameters:
key- the key
-