Interface StreamAddArgs<K,​V>


  • public interface StreamAddArgs<K,​V>
    Arguments object for RStream.add() method.
    Author:
    Nikita Koksharov
    • Method Detail

      • noMakeStream

        StreamAddArgs<K,​V> noMakeStream()
        Define to not create stream automatically if it doesn't exist
        Returns:
        arguments object
      • trim

        StreamAddArgs<K,​V> trim​(TrimStrategy strategy,
                                      int threshold)
        Defines trim strategy and threshold. Trims stream using almost exact trimming.
        Parameters:
        strategy - - trim strategy
        threshold - - trim threshold
        Returns:
        arguments object
      • trim

        StreamAddArgs<K,​V> trim​(TrimStrategy strategy,
                                      int threshold,
                                      int limit)
        Defines trim strategy, threshold and limit. Trims stream using almost exact trimming threshold up to limit.
        Parameters:
        strategy - - trim strategy
        threshold - - trim threshold
        limit - - trim limit
        Returns:
        arguments object
      • trimStrict

        StreamAddArgs<K,​V> trimStrict​(TrimStrategy strategy,
                                            int threshold)
        Defines trim strategy and threshold. Trims stream using strict trimming.
        Parameters:
        strategy - - trim strategy
        threshold - - trim threshold
        Returns:
        arguments object
      • entry

        static <K,​V> StreamAddArgs<K,​V> entry​(K k1,
                                                          V v1)
        Defines entry to add
        Type Parameters:
        K - - key type
        V - - value type
        Parameters:
        k1 - - key to add
        v1 - - value to add
        Returns:
        arguments object
      • entries

        static <K,​V> StreamAddArgs<K,​V> entries​(K k1,
                                                            V v1,
                                                            K k2,
                                                            V v2)
        Defines entries to add
        Type Parameters:
        K - - key type
        V - - value type
        Parameters:
        k1 - - 1st key to add
        v1 - - 1st value to add
        k2 - - 2nd key to add
        v2 - - 2nd value to add
        Returns:
        arguments object
      • entries

        static <K,​V> StreamAddArgs<K,​V> entries​(K k1,
                                                            V v1,
                                                            K k2,
                                                            V v2,
                                                            K k3,
                                                            V v3)
        Defines entries to add
        Type Parameters:
        K - - key type
        V - - value type
        Parameters:
        k1 - - 1st key to add
        v1 - - 1st value to add
        k2 - - 2nd key to add
        v2 - - 2nd value to add
        k3 - - 3rd key to add
        v3 - - 3rd value to add
        Returns:
        arguments object
      • entries

        static <K,​V> StreamAddArgs<K,​V> entries​(K k1,
                                                            V v1,
                                                            K k2,
                                                            V v2,
                                                            K k3,
                                                            V v3,
                                                            K k4,
                                                            V v4)
        Defines entries to add
        Type Parameters:
        K - - key type
        V - - value type
        Parameters:
        k1 - - 1st key to add
        v1 - - 1st value to add
        k2 - - 2nd key to add
        v2 - - 2nd value to add
        k3 - - 3rd key to add
        v3 - - 3rd value to add
        k4 - - 4th key to add
        v4 - - 4th key to add
        Returns:
        arguments object
      • entries

        static <K,​V> StreamAddArgs<K,​V> entries​(K k1,
                                                            V v1,
                                                            K k2,
                                                            V v2,
                                                            K k3,
                                                            V v3,
                                                            K k4,
                                                            V v4,
                                                            K k5,
                                                            V v5)
        Defines entries to add
        Type Parameters:
        K - - key type
        V - - value type
        Parameters:
        k1 - - 1st key to add
        v1 - - 1st value to add
        k2 - - 2nd key to add
        v2 - - 2nd value to add
        k3 - - 3rd key to add
        v3 - - 3rd value to add
        k4 - - 4th key to add
        v4 - - 4th key to add
        k5 - - 5th key to add
        v5 - - 5th key to add
        Returns:
        arguments object
      • entries

        static <K,​V> StreamAddArgs<K,​V> entries​(Map<K,​V> entries)
        Defines entries to add
        Type Parameters:
        K - - key type
        V - - value type
        Parameters:
        entries - - entries map to add
        Returns:
        arguments object