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>
  • Method Details

    • getProfile

      public @NonNull CooldownProfile getProfile(@NonNull K key, @NonNull CooldownProfileFactory profileFactory)
      Description copied from interface: CooldownRepository
      Returns the profile for the given key.

      If no profile exists in the repository, a new profile will be persisted and returned.

      Parameters:
      key - key that identifies the profile
      profileFactory - factory that creates profiles
      Returns:
      the profile
    • getProfileIfExists

      public @Nullable CooldownProfile getProfileIfExists(@NonNull K key)
      Description copied from interface: CooldownRepository
      Returns the profile for the given key, if it exists.
      Parameters:
      key - key that identifies the profile
      Returns:
      the profile, or null
    • deleteProfile

      public void deleteProfile(@NonNull K key)
      Description copied from interface: CooldownRepository
      Deletes the profile identified by the given key.
      Parameters:
      key - the key