Class EnumSetOutput<K,​V,​E extends Enum<E>>

  • Type Parameters:
    K - Key type.
    V - Value type.

    public class EnumSetOutput<K,​V,​E extends Enum<E>>
    extends CommandOutput<K,​V,​Set<E>>
    EnumSet output.
    Since:
    6.1
    Author:
    Mikhael Sokolov, Mark Paluch
    • Constructor Detail

      • EnumSetOutput

        public EnumSetOutput​(RedisCodec<K,​V> codec,
                             Class<E> enumClass,
                             UnaryOperator<String> enumValuePreprocessor,
                             Function<String,​E> onUnknownValue)
        Create a new EnumSetOutput.
        Parameters:
        codec - Codec used to encode/decode keys and values, must not be null.
        enumClass - Enum type.
        enumValuePreprocessor - pre-processor for String values before looking up the enum value.
        onUnknownValue - fallback Function to be called when an enum value cannot be looked up.
    • Method Detail

      • set

        public void set​(ByteBuffer bytes)
        Description copied from class: CommandOutput
        Update the command output with a sequence of bytes, or null. Concrete CommandOutput implementations must override this method to decode bulk/bytes response values.
        Overrides:
        set in class CommandOutput<K,​V,​Set<E extends Enum<E>>>
        Parameters:
        bytes - The command output, or null.
      • multi

        public void multi​(int count)
        Description copied from class: CommandOutput
        Mark the beginning of a multi sequence (array).
        Overrides:
        multi in class CommandOutput<K,​V,​Set<E extends Enum<E>>>
        Parameters:
        count - expected number of elements in this multi sequence.