Skip to content

Commit

Permalink
Merge pull request redis#902 from HeartSaVioR/remove-deprecated-methods
Browse files Browse the repository at this point in the history
Remove deprecated methods (blpop, brpop, pexpire)
  • Loading branch information
marcosnils committed Apr 22, 2015
2 parents ca59f9b + 7ff6061 commit a52902b
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 99 deletions.
47 changes: 0 additions & 47 deletions src/main/java/redis/clients/jedis/BinaryJedis.java
Original file line number Diff line number Diff line change
Expand Up @@ -338,37 +338,6 @@ public Long expire(final byte[] key, final int seconds) {
return client.getIntegerReply();
}

/**
* @deprecated use BinaryJedis.pexpire(byte[], long) or Jedis.pexpire(String,long) Set a timeout
* on the specified key. After the timeout the key will be automatically deleted by
* the server. A key with an associated timeout is said to be volatile in Redis
* terminology.
* <p>
* Voltile keys are stored on disk like the other keys, the timeout is persistent too
* like all the other aspects of the dataset. Saving a dataset containing expires and
* stopping the server does not stop the flow of time as Redis stores on disk the time
* when the key will no longer be available as Unix time, and not the remaining
* milliseconds.
* <p>
* Since Redis 2.1.3 you can update the value of the timeout of a key already having
* an expire set. It is also possible to undo the expire at all turning the key into a
* normal key using the {@link #persist(byte[]) PERSIST} command.
* <p>
* Time complexity: O(1)
* @see <ahref="http://redis.io/commands/pexpire">PEXPIRE Command</a>
* @param key
* @param milliseconds
* @return Integer reply, specifically: 1: the timeout was set. 0: the timeout was not set since
* the key already has an associated timeout (this may happen only in Redis versions <
* 2.1.3, Redis >= 2.1.3 will happily update the timeout), or the key does not exist.
*/
@Deprecated
public Long pexpire(String key, final long milliseconds) {
checkIsInMulti();
client.pexpire(key, milliseconds);
return client.getIntegerReply();
}

/**
* EXPIREAT works exctly like {@link #expire(byte[], int) EXPIRE} but instead to get the number of
* seconds representing the Time To Live of the key as a second argument (that is a relative way
Expand Down Expand Up @@ -1949,22 +1918,6 @@ public List<byte[]> brpop(final int timeout, final byte[]... keys) {
return brpop(getArgsAddTimeout(timeout, keys));
}

/**
* @deprecated unusable command, this command will be removed in 3.0.0.
*/
@Deprecated
public List<byte[]> blpop(byte[] arg) {
return blpop(new byte[][] { arg });
}

/**
* @deprecated unusable command, this command will be removed in 3.0.0.
*/
@Deprecated
public List<byte[]> brpop(byte[] arg) {
return brpop(new byte[][] { arg });
}

public List<byte[]> blpop(byte[]... args) {
checkIsInMulti();
client.blpop(args);
Expand Down
18 changes: 0 additions & 18 deletions src/main/java/redis/clients/jedis/BinaryJedisCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,6 @@ public interface BinaryJedisCommands {

Long expire(byte[] key, int seconds);

/**
* @deprecated String key operation on BinaryCommand. Use byte[] or JedisCommands
*/
@Deprecated
Long pexpire(final String key, final long milliseconds);

Long pexpire(byte[] key, final long milliseconds);

Long expireAt(byte[] key, long unixTime);
Expand Down Expand Up @@ -223,18 +217,6 @@ Set<byte[]> zrevrangeByLex(final byte[] key, final byte[] max, final byte[] min,

Long rpushx(byte[] key, byte[]... arg);

/**
* @deprecated unusable command, this command will be removed in 3.0.0.
*/
@Deprecated
List<byte[]> blpop(byte[] arg);

/**
* @deprecated unusable command, this command will be removed in 3.0.0.
*/
@Deprecated
List<byte[]> brpop(byte[] arg);

Long del(byte[] key);

byte[] echo(byte[] arg);
Expand Down
6 changes: 0 additions & 6 deletions src/main/java/redis/clients/jedis/BinaryShardedJedis.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,6 @@ public Long pexpire(byte[] key, final long milliseconds) {
return j.pexpire(key, milliseconds);
}

@Deprecated
public Long pexpire(String key, final long milliseconds) {
Jedis j = getShard(key);
return j.pexpire(key, milliseconds);
}

public Long expireAt(byte[] key, long unixTime) {
Jedis j = getShard(key);
return j.expireAt(key, unixTime);
Expand Down
16 changes: 0 additions & 16 deletions src/main/java/redis/clients/jedis/Jedis.java
Original file line number Diff line number Diff line change
Expand Up @@ -1683,22 +1683,6 @@ public List<String> brpop(String... args) {
}
}

/**
* @deprecated unusable command, this command will be removed in 3.0.0.
*/
@Deprecated
public List<String> blpop(String arg) {
return blpop(new String[] { arg });
}

/**
* @deprecated unusable command, this command will be removed in 3.0.0.
*/
@Deprecated
public List<String> brpop(String arg) {
return brpop(new String[] { arg });
}

/**
* Sort a Set or a List accordingly to the specified parameters and store the result at dstkey.
* @see #sort(String, SortingParams)
Expand Down
12 changes: 0 additions & 12 deletions src/main/java/redis/clients/jedis/JedisCommands.java
Original file line number Diff line number Diff line change
Expand Up @@ -214,20 +214,8 @@ Set<String> zrevrangeByLex(final String key, final String max, final String min,

Long rpushx(String key, String... string);

/**
* @deprecated unusable command, this will be removed in 3.0.0.
*/
@Deprecated
List<String> blpop(String arg);

List<String> blpop(int timeout, String key);

/**
* @deprecated unusable command, this will be removed in 3.0.0.
*/
@Deprecated
List<String> brpop(String arg);

List<String> brpop(int timeout, String key);

Long del(String key);
Expand Down

0 comments on commit a52902b

Please sign in to comment.