Interface RSetCache<V>

    • Method Detail

      • getLock

        RLock getLock​(V value)
        Returns lock instance associated with value
        Parameters:
        value - - set value
        Returns:
        lock
      • iterator

        Iterator<V> iterator​(int count)
        Returns an iterator over elements in this set. Elements are loaded in batch. Batch size is defined by count param.
        Parameters:
        count - - size of elements batch
        Returns:
        iterator
      • iterator

        Iterator<V> iterator​(String pattern,
                             int count)
        Returns an iterator over elements in this set. Elements are loaded in batch. Batch size is defined by count param. If pattern is not null then only elements match this pattern are loaded.
        Parameters:
        pattern - - search pattern
        count - - size of elements batch
        Returns:
        iterator
      • iterator

        Iterator<V> iterator​(String pattern)
        Returns values iterator matches pattern.
        Parameters:
        pattern - - search pattern
        Returns:
        iterator
      • mapReduce

        <KOut,​VOut> RCollectionMapReduce<V,​KOut,​VOut> mapReduce()
        Returns RMapReduce object associated with this map
        Type Parameters:
        KOut - output key
        VOut - output value
        Returns:
        MapReduce instance
      • add

        boolean add​(V value,
                    long ttl,
                    TimeUnit unit)
        Stores value with specified time to live. Value expires after specified time to live.
        Parameters:
        value - to add
        ttl - - time to live for key\value entry. If 0 then stores infinitely.
        unit - - time unit
        Returns:
        true if value has been added. false if value already been in collection.
      • size

        int size()
        Returns the number of elements in cache. This number can reflects expired elements too due to non realtime cleanup process.
        Specified by:
        size in interface Collection<V>
        Specified by:
        size in interface Set<V>
        Returns:
        size of set
      • readAll

        Set<V> readAll()
        Read all elements at once
        Returns:
        values