Remove @Deprecated TransactionBlock and PipelineBlock
* remove all @Deprecated methods and classes about TransactionBlock and PipelineBlock
This commit is contained in:
@@ -1697,22 +1697,6 @@ public class BinaryJedis implements BasicCommands, BinaryJedisCommands,
|
|||||||
return new Transaction(client);
|
return new Transaction(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
/**
|
|
||||||
* This method is deprecated due to its error prone
|
|
||||||
* and will be removed on next major release
|
|
||||||
* You can use multi() instead
|
|
||||||
* @see https://github.com/xetorthio/jedis/pull/498
|
|
||||||
*/
|
|
||||||
public List<Object> multi(final TransactionBlock jedisTransaction) {
|
|
||||||
List<Object> results = null;
|
|
||||||
jedisTransaction.setClient(client);
|
|
||||||
client.multi();
|
|
||||||
jedisTransaction.execute();
|
|
||||||
results = jedisTransaction.exec();
|
|
||||||
return results;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void checkIsInMulti() {
|
protected void checkIsInMulti() {
|
||||||
if (client.isInMulti()) {
|
if (client.isInMulti()) {
|
||||||
throw new JedisDataException(
|
throw new JedisDataException(
|
||||||
@@ -2132,19 +2116,6 @@ public class BinaryJedis implements BasicCommands, BinaryJedisCommands,
|
|||||||
return client.getStatusCodeReply();
|
return client.getStatusCodeReply();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
/**
|
|
||||||
* This method is deprecated due to its error prone with multi
|
|
||||||
* and will be removed on next major release
|
|
||||||
* You can use pipelined() instead
|
|
||||||
* @see https://github.com/xetorthio/jedis/pull/498
|
|
||||||
*/
|
|
||||||
public List<Object> pipelined(final PipelineBlock jedisPipeline) {
|
|
||||||
jedisPipeline.setClient(client);
|
|
||||||
jedisPipeline.execute();
|
|
||||||
return jedisPipeline.syncAndReturnAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
public Pipeline pipelined() {
|
public Pipeline pipelined() {
|
||||||
Pipeline pipeline = new Pipeline();
|
Pipeline pipeline = new Pipeline();
|
||||||
pipeline.setClient(client);
|
pipeline.setClient(client);
|
||||||
|
|||||||
@@ -481,19 +481,6 @@ public class BinaryShardedJedis extends Sharded<Jedis, JedisShardInfo>
|
|||||||
return j.linsert(key, where, pivot, value);
|
return j.linsert(key, where, pivot, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
/**
|
|
||||||
* This method is deprecated due to its error prone with multi
|
|
||||||
* and will be removed on next major release
|
|
||||||
* You can use pipelined() instead
|
|
||||||
* @see https://github.com/xetorthio/jedis/pull/498
|
|
||||||
*/
|
|
||||||
public List<Object> pipelined(ShardedJedisPipeline shardedJedisPipeline) {
|
|
||||||
shardedJedisPipeline.setShardedJedis(this);
|
|
||||||
shardedJedisPipeline.execute();
|
|
||||||
return shardedJedisPipeline.getResults();
|
|
||||||
}
|
|
||||||
|
|
||||||
public ShardedJedisPipeline pipelined() {
|
public ShardedJedisPipeline pipelined() {
|
||||||
ShardedJedisPipeline pipeline = new ShardedJedisPipeline();
|
ShardedJedisPipeline pipeline = new ShardedJedisPipeline();
|
||||||
pipeline.setShardedJedis(this);
|
pipeline.setShardedJedis(this);
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
package redis.clients.jedis;
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
/**
|
|
||||||
* This method is deprecated due to its error prone with multi
|
|
||||||
* and will be removed on next major release
|
|
||||||
* @see https://github.com/xetorthio/jedis/pull/498
|
|
||||||
*/
|
|
||||||
public abstract class PipelineBlock extends Pipeline {
|
|
||||||
public abstract void execute();
|
|
||||||
}
|
|
||||||
@@ -61,14 +61,6 @@ public class ShardedJedisPipeline extends PipelineBase {
|
|||||||
return formatted;
|
return formatted;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* This method will be removed in Jedis 3.0. Use the methods that return
|
|
||||||
* Response's and call sync().
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public void execute() {
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Client getClient(String key) {
|
protected Client getClient(String key) {
|
||||||
Client client = jedis.getShard(key).getClient();
|
Client client = jedis.getShard(key).getClient();
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
package redis.clients.jedis;
|
|
||||||
|
|
||||||
import redis.clients.jedis.exceptions.JedisException;
|
|
||||||
|
|
||||||
@Deprecated
|
|
||||||
/**
|
|
||||||
* This class is deprecated due to its error prone
|
|
||||||
* and will be removed on next major release
|
|
||||||
* @see https://github.com/xetorthio/jedis/pull/498
|
|
||||||
*/
|
|
||||||
public abstract class TransactionBlock extends Transaction {
|
|
||||||
public TransactionBlock(Client client) {
|
|
||||||
super(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
public TransactionBlock() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public abstract void execute() throws JedisException;
|
|
||||||
|
|
||||||
public void setClient(Client client) {
|
|
||||||
this.client = client;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user