public class RedisGloopMethods
extends io.toro.martini.redis.RedisBaseMethods
Constructor and Description |
---|
RedisGloopMethods(io.toro.martini.database.DataSourceManager dataSourceManager) |
Modifier and Type | Method and Description |
---|---|
static io.toro.gloop.object.property.GloopModel |
getKeyScanCursorAsGloopCursor(String connectionName,
io.lettuce.core.KeyScanCursor keyScanCursor,
io.toro.gloop.engine.GloopExecutionContext context)
Gets a KeyScanCursor as a Gloop Cursor.
|
static io.toro.gloop.object.property.GloopModel |
gloopGet(String connectionName,
Object key,
io.toro.gloop.engine.GloopExecutionContext context)
Single Gloop model get.
|
static Future<io.toro.gloop.object.property.GloopModel> |
gloopGetAsync(String connectionName,
Object key,
io.toro.gloop.engine.GloopExecutionContext context)
Asynchronous single Gloop model get.
|
static String |
gloopSet(String connectionName,
Object key,
io.toro.gloop.object.property.GloopModel value,
io.toro.gloop.engine.GloopExecutionContext context)
Single Gloop model set.
|
static Future<String> |
gloopSetAsync(String connectionName,
Object key,
io.toro.gloop.object.property.GloopModel value,
io.toro.gloop.engine.GloopExecutionContext context)
Asynchronous single Gloop model set.
|
static io.toro.gloop.object.property.GloopModel |
openRedisInputCursor(String connectionName,
io.toro.gloop.object.property.GloopModel scanArgs,
io.toro.gloop.engine.GloopExecutionContext context)
Opens a cursor that can be used to bulk-write data to a redis database.
|
static io.toro.gloop.object.property.GloopModel |
openRedisOutputCursor(String connectionName,
int batchSize,
int timeout,
io.toro.gloop.engine.GloopExecutionContext context)
Opens a cursor that can be used to bulk-write data to a redis database.
|
@Autowired RedisGloopMethods(io.toro.martini.database.DataSourceManager dataSourceManager)
@GloopParameter(name="redisFutureGloopGetOutput") public static Future<io.toro.gloop.object.property.GloopModel> gloopGetAsync(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, io.toro.gloop.engine.GloopExecutionContext context)
connectionName
- The Martini Runtime Redis connection pool namekey
- the key of the record@GloopParameter(name="redisGloopGetOutput") public static io.toro.gloop.object.property.GloopModel gloopGet(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) Object key, io.toro.gloop.engine.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) io.toro.gloop.object.property.GloopModel value, io.toro.gloop.engine.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) io.toro.gloop.object.property.GloopModel value, io.toro.gloop.engine.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 io.toro.gloop.object.property.GloopModel openRedisOutputCursor(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false,defaultValue="1000") int batchSize, @GloopParameter(allowNull=false,defaultValue="5") int timeout, io.toro.gloop.engine.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 whil writing a batch to thte database@GloopObjectParameter(value="output{\n redisKeyValues[]{\n key:object\n value:object\n }\n}") public static io.toro.gloop.object.property.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") io.toro.gloop.object.property.GloopModel scanArgs, io.toro.gloop.engine.GloopExecutionContext context)
Object.toString()
methodconnectionName
- The Martini Runtime Redis connection pool namescanArgs
- Scan arguments@GloopObjectParameter(value="output{\n redisKeys[]:object\n}") public static io.toro.gloop.object.property.GloopModel getKeyScanCursorAsGloopCursor(@GloopParameter(allowNull=false) String connectionName, @GloopParameter(allowNull=false) io.lettuce.core.KeyScanCursor keyScanCursor, io.toro.gloop.engine.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 © 2020. All rights reserved.