Class GeoAddArgs

  • All Implemented Interfaces:
    CompositeArgument

    public class GeoAddArgs
    extends Object
    implements CompositeArgument
    Argument list builder for the Redis GEOADD command starting from Redis 6.2. Static import the methods from GeoAddArgs.Builder and call the methods: xx() or nx() .

    GeoAddArgs is a mutable object and instances should be used only once to avoid shared mutable state.

    Since:
    6.1
    Author:
    Mark Paluch
    • Constructor Detail

      • GeoAddArgs

        public GeoAddArgs()
    • Method Detail

      • nx

        public GeoAddArgs nx()
        Don't update already existing elements. Always add new elements.
        Returns:
        this GeoAddArgs.
      • xx

        public GeoAddArgs xx()
        Only update elements that already exist. Never add elements.
        Returns:
        this GeoAddArgs.
      • ch

        public GeoAddArgs ch()
        Modify the return value from the number of new elements added, to the total number of elements changed.
        Returns:
        this GeoAddArgs.
      • build

        public <K,​V> void build​(CommandArgs<K,​V> args)
        Description copied from interface: CompositeArgument
        Build command arguments and contribute arguments to CommandArgs.

        Implementing classes are required to implement this method. Depending on the command nature and configured arguments, this method may contribute arguments but is not required to add arguments if none are specified.

        Specified by:
        build in interface CompositeArgument
        Type Parameters:
        K - Key type.
        V - Value type.
        Parameters:
        args - the command arguments, must not be null.