Module lettuce.core

Interface CompositeArgument

All Known Subinterfaces:
GeoSearch.GeoPredicate, GeoSearch.GeoRef<K>
All Known Implementing Classes:
AclSetuserArgs, BitFieldArgs, CopyArgs, GeoAddArgs, GeoArgs, GeoRadiusStoreArgs, GetExArgs, KeyScanArgs, KillArgs, LMoveArgs, LPosArgs, MigrateArgs, RestoreArgs, ScanArgs, SetArgs, SortArgs, StrAlgoArgs, TrackingArgs, XAutoClaimArgs, XPendingArgs, XTrimArgs, ZAddArgs, ZAggregateArgs, ZStoreArgs

public interface CompositeArgument
Interface for composite command argument objects. Implementing classes of CompositeArgument consolidate multiple arguments for a particular Redis command in to one type and reduce the amount of individual arguments passed in a method signature.

Command builder call build(CommandArgs) during command construction to contribute command arguments for command invocation. A composite argument is usually stateless as it can be reused multiple times by different commands.

Since:
5.0
Author:
Mark Paluch
See Also:
CommandArgs, SetArgs, ZAggregateArgs, GeoArgs
  • Method Summary

    Modifier and Type Method Description
    <K,​ V> void build​(CommandArgs<K,​V> args)
    Build command arguments and contribute arguments to CommandArgs.
  • Method Details

    • build

      <K,​ V> void build​(CommandArgs<K,​V> args)
      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.

      Type Parameters:
      K - Key type.
      V - Value type.
      Parameters:
      args - the command arguments, must not be null.