public class RedisGloopMethods
extends io.toro.martini.redis.RedisBaseMethods
| Constructor and Description |
|---|
RedisGloopMethods(DataSourceManager dataSourceManager) |
| Modifier and Type | Method and Description |
|---|---|
static GloopModel |
getKeyScanCursorAsGloopCursor(String connectionName,
KeyScanCursor keyScanCursor,
GloopExecutionContext context)
Gets a KeyScanCursor as a Gloop Cursor.
|
static GloopModel |
gloopGet(String connectionName,
Object key,
GloopExecutionContext context)
Single Gloop model get.
|
static Future<GloopModel> |
gloopGetAsync(String connectionName,
Object key,
GloopExecutionContext context)
Asynchronous single Gloop model get.
|
static String |
gloopSet(String connectionName,
Object key,
GloopModel value,
GloopExecutionContext context)
Single Gloop model set.
|
static Future<String> |
gloopSetAsync(String connectionName,
Object key,
GloopModel value,
GloopExecutionContext context)
Asynchronous single Gloop model set.
|
static GloopModel |
openRedisInputCursor(String connectionName,
GloopModel scanArgs,
GloopExecutionContext context)
Opens a cursor that can be used to bulk-write data to a redis database.
|
static GloopModel |
openRedisOutputCursor(String connectionName,
int batchSize,
int timeout,
GloopExecutionContext context)
Opens a cursor that can be used to bulk-write data to a redis database.
|
@Autowired RedisGloopMethods(DataSourceManager dataSourceManager)
@GloopParameter(name="redisFutureGloopGetOutput") public static Future<GloopModel> gloopGetAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context)
connectionName - The Martini Runtime Redis connection pool namekey - the key of the record@GloopParameter(name="redisGloopGetOutput") public static GloopModel gloopGet(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, GloopExecutionContext context)
connectionName - The Martini Runtime Redis connection pool namekey - the key of the recordOK if SET was executed correctly.@GloopParameter(name="redisFutureGloopSetOutput") public static Future<String> gloopSetAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) GloopModel value, GloopExecutionContext context)
connectionName - The Martini Runtime Redis connection pool namekey - the key of the recordvalue - the Gloop Object which is the valueOK if SET was executed correctly.@GloopParameter(name="redisGloopSetOutput") public static String gloopSet(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, @GloopParameter(allowNull=false) GloopModel value, GloopExecutionContext context)
connectionName - The Martini Runtime Redis connection pool namekey - the key of the recordvalue - the Gloop Object which is the valueOK if SET was executed correctly.@GloopObjectParameter(value="output{\n redisOutputCursor[]{\n redisKey\n redisValue:object\n }\n}") public static GloopModel openRedisOutputCursor(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false,defaultValue="1000") int batchSize, @GloopParameter(allowNull=false,defaultValue="5") int timeout, GloopExecutionContext context)
Object.toString() methodconnectionName - The Martini Runtime Redis connection pool namebatchSize - How many records to queue before writing them to the databasetimeout - How long to wait (in seconds) before throwing an exception while writing a batch to the database@GloopObjectParameter(value="output{\n redisKeyValues[]{\n key:object\n value:object\n }\n}") public static GloopModel openRedisInputCursor(@GloopParameter(allowNull=false) String connectionName, @GloopObjectParameter(value="scanArgs{\n limit:long:Limit the scan by count:false\n match::Set the match filter:false\n}\n") GloopModel scanArgs, GloopExecutionContext context)
Object.toString() methodconnectionName - The Martini Runtime Redis connection pool namescanArgs - Scan arguments@GloopObjectParameter(value="output{\n redisKeys[]:object\n}") public static GloopModel getKeyScanCursorAsGloopCursor(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) KeyScanCursor keyScanCursor, GloopExecutionContext context)
RedisKeyMethods#scan(String) method or any other scan method to get the initial KeyScanCursor. Then call this
(with the same connection name) to convert the Redis KeyScanCursor to a GloopCursorkeyScanCursor - The KeyScanCursor to get the keys fromCopyright © 2022. All rights reserved.