public class Pipeline extends AbstractPipeline implements DatabasePipelineCommands, java.io.Closeable
| Modifier and Type | Field and Description |
|---|---|
protected Connection |
connection |
commandObjects| Constructor and Description |
|---|
Pipeline(Connection connection) |
Pipeline(Connection connection,
boolean closeConnection) |
Pipeline(Jedis jedis) |
| Modifier and Type | Method and Description |
|---|---|
<T> Response<T> |
appendCommand(CommandObject<T> commandObject) |
void |
close() |
Response<java.lang.Boolean> |
copy(byte[] srcKey,
byte[] dstKey,
int db,
boolean replace)
Binary version of
COPY. |
Response<java.lang.Boolean> |
copy(java.lang.String srcKey,
java.lang.String dstKey,
int db,
boolean replace)
Copy the value stored at the source key to the destination key.
|
Response<java.lang.Long> |
dbSize()
Return the number of keys in the currently-selected database.
|
boolean |
hasPipelinedResponse() |
Response<java.lang.String> |
migrate(java.lang.String host,
int port,
byte[] key,
int destinationDB,
int timeout)
Binary version of
MIGRATE. |
Response<java.lang.String> |
migrate(java.lang.String host,
int port,
int destinationDB,
int timeout,
MigrateParams params,
byte[]... keys)
Binary version of {@link DatabasePipelineCommands#migrate(String, int, int, int, MigrateParams, String...)
|
Response<java.lang.String> |
migrate(java.lang.String host,
int port,
int destinationDB,
int timeout,
MigrateParams params,
java.lang.String... keys)
Migrate Command
Atomically transfer a key from a source Redis instance to a destination Redis instance.
|
Response<java.lang.String> |
migrate(java.lang.String host,
int port,
java.lang.String key,
int destinationDB,
int timeout)
Migrate Command
Atomically transfer a key from a source Redis instance to a destination Redis instance.
|
Response<java.lang.Long> |
move(byte[] key,
int dbIndex)
Binary version of
MOVE. |
Response<java.lang.Long> |
move(java.lang.String key,
int dbIndex)
Move the specified key from the currently selected DB to the specified destination DB.
|
Response<java.lang.String> |
select(int index)
Select the DB with having the specified zero-based numeric index.
|
Response<java.lang.String> |
swapDB(int index1,
int index2)
This command swaps two Redis databases, so that immediately all the clients connected to a
given database will see the data of the other database, and the other way around.
|
void |
sync()
Synchronize pipeline by reading all responses.
|
java.util.List<java.lang.Object> |
syncAndReturnAll()
Synchronize pipeline by reading all responses.
|
Response<java.util.List<java.lang.String>> |
time() |
Response<KeyValue<java.lang.Long,java.lang.Long>> |
waitAOF(long numLocal,
long numReplicas,
long timeout) |
Response<java.lang.Long> |
waitReplicas(int replicas,
long timeout) |
publish, publishappend, append, bfAdd, bfCard, bfExists, bfInfo, bfInsert, bfInsert, bfLoadChunk, bfMAdd, bfMExists, bfReserve, bfReserve, bfScanDump, bitcount, bitcount, bitcount, bitcount, bitcount, bitcount, bitfield, bitfield, bitfieldReadonly, bitfieldReadonly, bitop, bitop, bitpos, bitpos, bitpos, bitpos, blmove, blmove, blmpop, blmpop, blmpop, blmpop, blpop, blpop, blpop, blpop, blpop, blpop, brpop, brpop, brpop, brpop, brpop, brpop, brpoplpush, brpoplpush, bzmpop, bzmpop, bzmpop, bzmpop, bzpopmax, bzpopmax, bzpopmin, bzpopmin, cfAdd, cfAddNx, cfCount, cfDel, cfExists, cfInfo, cfInsert, cfInsert, cfInsertNx, cfInsertNx, cfLoadChunk, cfMExists, cfReserve, cfReserve, cfScanDump, cmsIncrBy, cmsInfo, cmsInitByDim, cmsInitByProb, cmsMerge, cmsMerge, cmsQuery, copy, copy, decr, decr, decrBy, decrBy, del, del, del, del, dump, dump, eval, eval, eval, eval, eval, eval, eval, eval, evalReadonly, evalReadonly, evalsha, evalsha, evalsha, evalsha, evalsha, evalsha, evalsha, evalsha, evalshaReadonly, evalshaReadonly, executeCommand, exists, exists, exists, exists, expire, expire, expire, expire, expireAt, expireAt, expireAt, expireAt, expireTime, expireTime, fcall, fcall, fcallReadonly, fcallReadonly, ftAggregate, ftAliasAdd, ftAliasDel, ftAliasUpdate, ftAlter, ftAlter, ftConfigGet, ftConfigGet, ftConfigSet, ftConfigSet, ftCreate, ftCreate, ftDictAdd, ftDictAddBySampleKey, ftDictDel, ftDictDelBySampleKey, ftDictDump, ftDictDumpBySampleKey, ftDropIndex, ftDropIndexDD, ftExplain, ftExplainCLI, ftInfo, ftSearch, ftSearch, ftSearch, ftSearch, ftSpellCheck, ftSpellCheck, ftSugAdd, ftSugAddIncr, ftSugDel, ftSugGet, ftSugGet, ftSugGetWithScores, ftSugGetWithScores, ftSugLen, ftSynDump, ftSynUpdate, ftTagVals, functionDelete, functionDelete, functionDump, functionFlush, functionFlush, functionKill, functionList, functionList, functionList, functionListBinary, functionListWithCode, functionListWithCode, functionListWithCode, functionListWithCodeBinary, functionLoad, functionLoad, functionLoadReplace, functionLoadReplace, functionRestore, functionRestore, functionStats, functionStatsBinary, geoadd, geoadd, geoadd, geoadd, geoadd, geoadd, geodist, geodist, geodist, geodist, geohash, geohash, geopos, geopos, georadius, georadius, georadius, georadius, georadiusByMember, georadiusByMember, georadiusByMember, georadiusByMember, georadiusByMemberReadonly, georadiusByMemberReadonly, georadiusByMemberReadonly, georadiusByMemberReadonly, georadiusByMemberStore, georadiusByMemberStore, georadiusReadonly, georadiusReadonly, georadiusReadonly, georadiusReadonly, georadiusStore, georadiusStore, geosearch, geosearch, geosearch, geosearch, geosearch, geosearch, geosearch, geosearch, geosearch, geosearch, geosearchStore, geosearchStore, geosearchStore, geosearchStore, geosearchStore, geosearchStore, geosearchStore, geosearchStore, geosearchStore, geosearchStore, geosearchStoreStoreDist, geosearchStoreStoreDist, get, get, getbit, getbit, getDel, getDel, getEx, getEx, getrange, getrange, getSet, getSet, hdel, hdel, hexists, hexists, hexpire, hexpire, hexpire, hexpire, hexpireAt, hexpireAt, hexpireAt, hexpireAt, hexpireTime, hexpireTime, hget, hget, hgetAll, hgetAll, hgetdel, hgetdel, hgetex, hgetex, hincrBy, hincrBy, hincrByFloat, hincrByFloat, hkeys, hkeys, hlen, hlen, hmget, hmget, hmset, hmset, hpersist, hpersist, hpexpire, hpexpire, hpexpire, hpexpire, hpexpireAt, hpexpireAt, hpexpireAt, hpexpireAt, hpexpireTime, hpexpireTime, hpttl, hpttl, hrandfield, hrandfield, hrandfield, hrandfield, hrandfieldWithValues, hrandfieldWithValues, hscan, hscan, hscanNoValues, hscanNoValues, hset, hset, hset, hset, hsetex, hsetex, hsetex, hsetex, hsetnx, hsetnx, hstrlen, hstrlen, httl, httl, hvals, hvals, incr, incr, incrBy, incrBy, incrByFloat, incrByFloat, jsonArrAppend, jsonArrAppend, jsonArrAppendWithEscape, jsonArrIndex, jsonArrIndex, jsonArrIndexWithEscape, jsonArrInsert, jsonArrInsert, jsonArrInsertWithEscape, jsonArrLen, jsonArrLen, jsonArrLen, jsonArrPop, jsonArrPop, jsonArrPop, jsonArrPop, jsonArrPop, jsonArrPop, jsonArrPop, jsonArrPop, jsonArrTrim, jsonArrTrim, jsonClear, jsonClear, jsonClear, jsonDel, jsonDel, jsonDel, jsonGet, jsonGet, jsonGet, jsonGet, jsonGet, jsonMerge, jsonMerge, jsonMGet, jsonMGet, jsonNumIncrBy, jsonNumIncrBy, jsonSet, jsonSet, jsonSet, jsonSet, jsonSetWithEscape, jsonSetWithEscape, jsonStrAppend, jsonStrAppend, jsonStrAppend, jsonStrLen, jsonStrLen, jsonStrLen, jsonToggle, jsonToggle, jsonType, jsonType, jsonType, keys, keys, lcs, lcs, lindex, lindex, linsert, linsert, llen, llen, lmove, lmove, lmpop, lmpop, lmpop, lmpop, lpop, lpop, lpop, lpop, lpos, lpos, lpos, lpos, lpos, lpos, lpush, lpush, lpushx, lpushx, lrange, lrange, lrem, lrem, lset, lset, ltrim, ltrim, memoryUsage, memoryUsage, memoryUsage, memoryUsage, mget, mget, migrate, migrate, migrate, migrate, mset, mset, msetnx, msetnx, objectEncoding, objectEncoding, objectFreq, objectFreq, objectIdletime, objectIdletime, objectRefcount, objectRefcount, persist, persist, pexpire, pexpire, pexpire, pexpire, pexpireAt, pexpireAt, pexpireAt, pexpireAt, pexpireTime, pexpireTime, pfadd, pfadd, pfcount, pfcount, pfcount, pfcount, pfmerge, pfmerge, psetex, psetex, pttl, pttl, randomBinaryKey, randomKey, rename, rename, renamenx, renamenx, restore, restore, restore, restore, rpop, rpop, rpop, rpop, rpoplpush, rpoplpush, rpush, rpush, rpushx, rpushx, sadd, sadd, scan, scan, scan, scan, scan, scan, scard, scard, scriptExists, scriptExists, scriptFlush, scriptFlush, scriptFlush, scriptFlush, scriptKill, scriptKill, scriptLoad, scriptLoad, sdiff, sdiff, sdiffstore, sdiffstore, sendCommand, sendCommand, sendCommand, set, set, set, set, setbit, setbit, setex, setex, setGet, setGet, setGet, setGet, setJsonObjectMapper, setnx, setnx, setrange, setrange, sinter, sinter, sintercard, sintercard, sintercard, sintercard, sinterstore, sinterstore, sismember, sismember, smembers, smembers, smismember, smismember, smove, smove, sort, sort, sort, sort, sort, sort, sort, sort, sortReadonly, sortReadonly, spop, spop, spop, spop, srandmember, srandmember, srandmember, srandmember, srem, srem, sscan, sscan, strlen, strlen, substr, substr, sunion, sunion, sunionstore, sunionstore, tdigestAdd, tdigestByRank, tdigestByRevRank, tdigestCDF, tdigestCreate, tdigestCreate, tdigestInfo, tdigestMax, tdigestMerge, tdigestMerge, tdigestMin, tdigestQuantile, tdigestRank, tdigestReset, tdigestRevRank, tdigestTrimmedMean, topkAdd, topkIncrBy, topkInfo, topkList, topkListWithCount, topkQuery, topkReserve, topkReserve, touch, touch, touch, touch, tsAdd, tsAdd, tsAdd, tsAdd, tsAlter, tsCreate, tsCreate, tsCreateRule, tsCreateRule, tsDecrBy, tsDecrBy, tsDecrBy, tsDel, tsDeleteRule, tsGet, tsGet, tsIncrBy, tsIncrBy, tsIncrBy, tsInfo, tsInfoDebug, tsMAdd, tsMGet, tsMRange, tsMRange, tsMRevRange, tsMRevRange, tsQueryIndex, tsRange, tsRange, tsRevRange, tsRevRange, ttl, ttl, type, type, unlink, unlink, unlink, unlink, vadd, vadd, vadd, vadd, vadd, vadd, vaddFP32, vaddFP32, vaddFP32, vaddFP32, vaddFP32, vaddFP32, vcard, vcard, vdim, vdim, vemb, vemb, vembRaw, vembRaw, vgetattr, vgetattr, vinfo, vlinks, vlinks, vlinksWithScores, vlinksWithScores, vrandmember, vrandmember, vrandmember, vrandmember, vrem, vrem, vsetattr, vsetattr, vsim, vsim, vsim, vsim, vsimByElement, vsimByElement, vsimByElement, vsimByElement, vsimByElementWithScores, vsimByElementWithScores, vsimWithScores, vsimWithScores, waitAOF, waitAOF, waitReplicas, waitReplicas, xack, xack, xackdel, xackdel, xackdel, xackdel, xadd, xadd, xadd, xautoclaim, xautoclaim, xautoclaimJustId, xautoclaimJustId, xclaim, xclaim, xclaimJustId, xclaimJustId, xdel, xdel, xdelex, xdelex, xdelex, xdelex, xgroupCreate, xgroupCreate, xgroupCreateConsumer, xgroupCreateConsumer, xgroupDelConsumer, xgroupDelConsumer, xgroupDestroy, xgroupDestroy, xgroupSetID, xgroupSetID, xinfoConsumers, xinfoConsumers, xinfoConsumers2, xinfoGroups, xinfoGroups, xinfoStream, xinfoStream, xinfoStreamFull, xinfoStreamFull, xinfoStreamFull, xinfoStreamFull, xlen, xlen, xpending, xpending, xpending, xpending, xrange, xrange, xrange, xrange, xrange, xrange, xread, xread, xreadAsMap, xreadBinary, xreadBinaryAsMap, xreadGroup, xreadGroup, xreadGroupAsMap, xreadGroupBinary, xreadGroupBinaryAsMap, xrevrange, xrevrange, xrevrange, xrevrange, xrevrange, xrevrange, xtrim, xtrim, xtrim, xtrim, zadd, zadd, zadd, zadd, zadd, zadd, zadd, zadd, zaddIncr, zaddIncr, zcard, zcard, zcount, zcount, zcount, zcount, zdiff, zdiff, zdiffstore, zdiffStore, zdiffstore, zdiffStore, zdiffWithScores, zdiffWithScores, zincrby, zincrby, zincrby, zincrby, zinter, zinter, zintercard, zintercard, zintercard, zintercard, zinterstore, zinterstore, zinterstore, zinterstore, zinterWithScores, zinterWithScores, zlexcount, zlexcount, zmpop, zmpop, zmpop, zmpop, zmscore, zmscore, zpopmax, zpopmax, zpopmax, zpopmax, zpopmin, zpopmin, zpopmin, zpopmin, zrandmember, zrandmember, zrandmember, zrandmember, zrandmemberWithScores, zrandmemberWithScores, zrange, zrange, zrange, zrange, zrangeByLex, zrangeByLex, zrangeByLex, zrangeByLex, zrangeByScore, zrangeByScore, zrangeByScore, zrangeByScore, zrangeByScore, zrangeByScore, zrangeByScore, zrangeByScore, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangeByScoreWithScores, zrangestore, zrangestore, zrangeWithScores, zrangeWithScores, zrangeWithScores, zrangeWithScores, zrank, zrank, zrankWithScore, zrankWithScore, zrem, zrem, zremrangeByLex, zremrangeByLex, zremrangeByRank, zremrangeByRank, zremrangeByScore, zremrangeByScore, zremrangeByScore, zremrangeByScore, zrevrange, zrevrange, zrevrangeByLex, zrevrangeByLex, zrevrangeByLex, zrevrangeByLex, zrevrangeByScore, zrevrangeByScore, zrevrangeByScore, zrevrangeByScore, zrevrangeByScore, zrevrangeByScore, zrevrangeByScore, zrevrangeByScore, zrevrangeByScoreWithScores, zrevrangeByScoreWithScores, zrevrangeByScoreWithScores, zrevrangeByScoreWithScores, zrevrangeByScoreWithScores, zrevrangeByScoreWithScores, zrevrangeByScoreWithScores, zrevrangeByScoreWithScores, zrevrangeWithScores, zrevrangeWithScores, zrevrank, zrevrank, zrevrankWithScore, zrevrankWithScore, zscan, zscan, zscore, zscore, zunion, zunion, zunionstore, zunionstore, zunionstore, zunionstore, zunionWithScores, zunionWithScoresclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waithscan, hscanNoValuessdiffStore, sscanzscanxaddhscan, hscanNoValuessscanzscanxaddftAlter, ftAlter, ftCreate, ftCreate, ftCreate, ftSearchjsonMGet, jsonSetLegacy, jsonSetLegacyjsonMGet, jsonSet, jsonSet, jsonSetWithEscape, jsonSetWithEscapeprotected final Connection connection
public Pipeline(Jedis jedis)
public Pipeline(Connection connection)
public Pipeline(Connection connection, boolean closeConnection)
public final <T> Response<T> appendCommand(CommandObject<T> commandObject)
appendCommand in class PipeliningBasepublic void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class AbstractPipelinepublic void sync()
sync in class AbstractPipelinepublic java.util.List<java.lang.Object> syncAndReturnAll()
public final boolean hasPipelinedResponse()
public Response<java.lang.Long> waitReplicas(int replicas, long timeout)
public Response<KeyValue<java.lang.Long,java.lang.Long>> waitAOF(long numLocal, long numReplicas, long timeout)
public Response<java.util.List<java.lang.String>> time()
public Response<java.lang.String> select(int index)
DatabasePipelineCommandsselect in interface DatabasePipelineCommandsindex - the index of dbpublic Response<java.lang.Long> dbSize()
DatabasePipelineCommandsdbSize in interface DatabasePipelineCommandspublic Response<java.lang.String> swapDB(int index1, int index2)
DatabasePipelineCommandsswapDB in interface DatabasePipelineCommandspublic Response<java.lang.Long> move(java.lang.String key, int dbIndex)
DatabasePipelineCommandsmove in interface DatabasePipelineCommandskey - The specified keydbIndex - Specified destination databasepublic Response<java.lang.Long> move(byte[] key, int dbIndex)
DatabasePipelineCommandsMOVE.move in interface DatabasePipelineCommandsDatabaseCommands.move(String, int)public Response<java.lang.Boolean> copy(java.lang.String srcKey, java.lang.String dstKey, int db, boolean replace)
DatabasePipelineCommandscopy in interface DatabasePipelineCommandssrcKey - The source key.dstKey - The destination key.db - Allows specifying an alternative logical database index for the destination key.replace - Removes the destination key before copying the value to it, in order to avoid error.public Response<java.lang.Boolean> copy(byte[] srcKey, byte[] dstKey, int db, boolean replace)
DatabasePipelineCommandsCOPY.copy in interface DatabasePipelineCommandsDatabasePipelineCommands.copy(String, String, int, boolean)public Response<java.lang.String> migrate(java.lang.String host, int port, byte[] key, int destinationDB, int timeout)
DatabasePipelineCommandsMIGRATE.migrate in interface DatabasePipelineCommandsDatabasePipelineCommands.migrate(String, int, String, int, int)public Response<java.lang.String> migrate(java.lang.String host, int port, java.lang.String key, int destinationDB, int timeout)
DatabasePipelineCommandsmigrate in interface DatabasePipelineCommandshost - Target hostport - Target portkey - Migrate keydestinationDB - Target dbtimeout - The maximum idle time in any moment of the communication with the
destination instance in milliseconds.public Response<java.lang.String> migrate(java.lang.String host, int port, int destinationDB, int timeout, MigrateParams params, byte[]... keys)
DatabasePipelineCommandsMIGRATE.migrate in interface DatabasePipelineCommandsDatabasePipelineCommands.migrate(String, int, int, int, MigrateParams, String...)public Response<java.lang.String> migrate(java.lang.String host, int port, int destinationDB, int timeout, MigrateParams params, java.lang.String... keys)
DatabasePipelineCommandsmigrate in interface DatabasePipelineCommandshost - Target hostport - Target portdestinationDB - Target dbtimeout - The maximum idle time in any moment of the communication with the
destination instance in milliseconds.params - MigrateParamskeys - The keys to migrateCopyright © 2025. All rights reserved.