Interface RMultimapCache<K,V>

Type Parameters:
K - key type
V - value type
All Superinterfaces:
RExpirable, RExpirableAsync, RMultimap<K,V>, RMultimapAsync<K,V>, RMultimapCacheAsync<K,V>, RObject, RObjectAsync
All Known Subinterfaces:
RListMultimapCache<K,V>, RListMultimapCacheNative<K,V>, RSetMultimapCache<K,V>, RSetMultimapCacheNative<K,V>
All Known Implementing Classes:
RedissonListMultimapCache, RedissonListMultimapCacheNative, RedissonSetMultimapCache, RedissonSetMultimapCacheNative

public interface RMultimapCache<K,V> extends RMultimap<K,V>, RMultimapCacheAsync<K,V>
Base Multimap interface. Allows to map multiple values per key and define expiration per key.
Author:
Nikita Koksharov
  • Method Details

    • expireKey

      boolean expireKey(K key, long timeToLive, TimeUnit timeUnit)
      Set a timeout for key. After the timeout has expired, the key and its values will automatically be deleted.
      Parameters:
      key - - map key
      timeToLive - - timeout before key will be deleted
      timeUnit - - timeout time unit
      Returns:
      true if key exists and the timeout was set and false if key not exists