Class RedisUtilMethods

java.lang.Object
io.toro.martini.redis.RedisUtilMethods

public class RedisUtilMethods extends Object
  • Field Details

  • Constructor Details

    • RedisUtilMethods

      @Autowired RedisUtilMethods(io.toro.martini.database.DataSourceManager sourceManager)
  • Method Details

    • gloopModelToScanArgs

      protected static io.lettuce.core.ScanArgs gloopModelToScanArgs(@GloopObjectParameter("scanArgs{\n limit:long:Limit the scan by count:false\n match::Set the match filter:false\n}\n") GloopModel scanArgs)
    • isScanCursorFinished

      @GloopParameter(name="redisStreamScanCursorFinished") public static boolean isScanCursorFinished(@GloopParameter(allowNull=false) io.lettuce.core.ScanCursor scanCursor)
      Checks whether a StreamScanCursor is marked as finished
      Parameters:
      scanCursor - The StreamScanCursor to check
      Returns:
      boolean stating whether the cursor has completed
    • getStreamScanCursorCount

      @GloopParameter(name="redisStreamScanCursorCount") public static long getStreamScanCursorCount(@GloopParameter(allowNull=false) io.lettuce.core.StreamScanCursor streamScanCursor)
      Gets a StreamScanCursor count
      Parameters:
      streamScanCursor - The StreamScanCursor to get the count from
      Returns:
      long stating the count of the cursor
    • getScanCursorId

      @GloopParameter(name="redisStreamScanCursorId") public static String getScanCursorId(@GloopParameter(allowNull=false) io.lettuce.core.ScanCursor scanCursor)
      Gets a scanCursor id
      Parameters:
      scanCursor - The StreamScanCursor to get the id from
      Returns:
      String stating the id of the cursor
    • getMapScanCursorMap

      @GloopParameter(name="redisMapScanCursorMap") public static Map getMapScanCursorMap(@GloopParameter(allowNull=false) io.lettuce.core.MapScanCursor mapScanCursor)
      Gets a MapScanCursor map
      Parameters:
      mapScanCursor - The MapScanCursor to get the map from
      Returns:
      map of the cursor
    • getMapScanCursorMapAsGloopModel

      @GloopObjectParameter("output{\n redisMapCursorModel*{\n }\n}") public static GloopModel getMapScanCursorMapAsGloopModel(@GloopParameter(allowNull=false) io.lettuce.core.MapScanCursor mapScanCursor)
      Gets a MapScanCursor map, as a GloopModel
      Parameters:
      mapScanCursor - The MapScanCursor to get the map from as a @link GloopModel
      Returns:
      map of the cursor
    • getKeyScanCursorKeys

      @GloopParameter(name="redisKeyScanCursorKeys") public static List getKeyScanCursorKeys(@GloopParameter(allowNull=false) io.lettuce.core.KeyScanCursor keyScanCursor)
      Gets a KeyScanCursor key list
      Parameters:
      keyScanCursor - The KeyScanCursor to get the keys from
      Returns:
      keys of the cursor
    • getValueScanCursorValues

      @GloopParameter(name="redisValueScanCursorValues") public static List getValueScanCursorValues(@GloopParameter(allowNull=false) io.lettuce.core.ValueScanCursor valueScanCursor)
      Gets a ValueScanCursor value list
      Parameters:
      valueScanCursor - The ValueScanCursor to get the values from
      Returns:
      values of the cursor
    • getScoredValueScanCursorValues

      @GloopParameter(name="redisValueScanCursorValues") public static List<io.lettuce.core.ScoredValue> getScoredValueScanCursorValues(@GloopParameter(allowNull=false) io.lettuce.core.ScoredValueScanCursor scoredValueScanCursor)
      Gets a ScoredValueScanCursor score list
      Parameters:
      scoredValueScanCursor - The ScoredValueScanCursor to get the scores from
      Returns:
      scored values of the cursor
    • getScoredValueScanCursorValuesAsGloopModel

      @GloopObjectParameter("output{\n scoredValues[]{\n value:object\n score:double\n }\n}") public static GloopModel getScoredValueScanCursorValuesAsGloopModel(@GloopParameter(allowNull=false) io.lettuce.core.ScoredValueScanCursor scoredValueScanCursor)
      Gets a ScoredValueScanCursor score list
      Parameters:
      scoredValueScanCursor - The ScoredValueScanCursor to get the scores from
      Returns:
      scored values of the cursor
    • getKeyValueAsGloopModel

      @GloopObjectParameter("output{\n redisKeyValue{\n key:object\n value:object\n }\n}") public static GloopModel getKeyValueAsGloopModel(@GloopParameter(allowNull=false) io.lettuce.core.KeyValue redisKeyValue)
    • getKeyValuesAsGloopModel

      @GloopObjectParameter("output{\n redisKeyValues[]{\n key:object\n value:object\n }\n}") public static GloopModel getKeyValuesAsGloopModel(@GloopParameter(allowNull=false) List<io.lettuce.core.KeyValue> redisKeyValues)
    • getMapAsGloopModel

      @GloopObjectParameter("output{\nredisMap[]{\n name:object\n value:object\n}\n}") public static GloopModel getMapAsGloopModel(@GloopParameter(allowNull=false) Map<Object,Object> map)
    • getGloopModelAsMap

      public static Map<Object,Object> getGloopModelAsMap(@GloopObjectParameter("redisMap[]{\n name:object\n value:object\n}\n") GloopModel redisMap)