Interface RLocalCachedMapRx<K,V>

Type Parameters:
K - map key
V - map value
All Superinterfaces:
RExpirableRx, RMapRx<K,V>, RObjectRx

public interface RLocalCachedMapRx<K,V> extends RMapRx<K,V>
Map object with local entry cache support.

Each instance maintains local cache to achieve fast read operations. Suitable for maps which used mostly for read operations and network roundtrip delays are undesirable.

Author:
Nikita Koksharov
  • Method Details

    • clearLocalCache

      io.reactivex.rxjava3.core.Completable clearLocalCache()
      Clears local cache across all instances
      Returns:
      void
    • cachedKeySet

      Set<K> cachedKeySet()
      Returns all keys stored in local cache
      Returns:
      keys
    • cachedValues

      Collection<V> cachedValues()
      Returns all values stored in local cache
      Returns:
      values
    • cachedEntrySet

      Set<Map.Entry<K,V>> cachedEntrySet()
      Returns all map entries stored in local cache
      Returns:
      entries
    • getCachedMap

      Map<K,V> getCachedMap()
      Returns state of local cache
      Returns:
      map