Skip to content

Commit c455658

Browse files
committed
move javadoc to interface
1 parent fda96ed commit c455658

File tree

4 files changed

+94
-194
lines changed

4 files changed

+94
-194
lines changed

src/main/java/redis/clients/jedis/Jedis.java

Lines changed: 0 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,41 +1167,12 @@ public long hset(final byte[] key, final Map<byte[], byte[]> hash) {
11671167
return connection.executeCommand(commandObjects.hset(key, hash));
11681168
}
11691169

1170-
/**
1171-
* Sets the specified field in the hash stored at key to the specified value with additional parameters,
1172-
* and optionally set their expiration. Use `HSetExParams` object to specify expiration parameters.
1173-
* This command can overwrite any existing fields in the hash.
1174-
* If key does not exist, a new key holding a hash is created.
1175-
*
1176-
* @param key the key of the hash
1177-
* @param params additional parameters for the HSETEX command
1178-
* @param field the field in the hash
1179-
* @param value the value to set
1180-
* @return 0 if no fields were set, 1 if all the fields were set
1181-
* @throws IllegalStateException if the command is executed in a transaction or pipeline context
1182-
*
1183-
* @see HSetExParams
1184-
*/
11851170
@Override
11861171
public long hsetex(byte[] key, HSetExParams params, byte[] field, byte[] value) {
11871172
checkIsInMultiOrPipeline();
11881173
return connection.executeCommand(commandObjects.hsetex(key, params, field, value));
11891174
}
11901175

1191-
/**
1192-
* Sets the specified fields in the hash stored at key to the specified values with additional parameters,
1193-
* and optionally set their expiration. Use `HSetExParams` object to specify expiration parameters.
1194-
* This command can overwrite any existing fields in the hash.
1195-
* If key does not exist, a new key holding a hash is created.
1196-
*
1197-
* @param key the key of the hash
1198-
* @param params the parameters for the HSETEX command
1199-
* @param hash the map containing field-value pairs to set in the hash
1200-
* @return 0 if no fields were set, 1 if all the fields were set
1201-
* @throws IllegalStateException if the command is executed in a transaction or pipeline context
1202-
*
1203-
* @see HSetExParams
1204-
*/
12051176
@Override
12061177
public long hsetex(byte[] key, HSetExParams params, Map<byte[], byte[]> hash){
12071178
checkIsInMultiOrPipeline();
@@ -1224,33 +1195,12 @@ public byte[] hget(final byte[] key, final byte[] field) {
12241195
return connection.executeCommand(commandObjects.hget(key, field));
12251196
}
12261197

1227-
/**
1228-
* Retrieves the values associated with the specified fields in a hash stored at the given key
1229-
* and optionally sets their expiration. Use `HGetExParams` object to specify expiration parameters.
1230-
*
1231-
* @param key the key of the hash
1232-
* @param params additional parameters for the HGETEX command
1233-
* @param fields the fields whose values are to be retrieved
1234-
* @return a list of the value associated with each field or nil if the field doesn’t exist.
1235-
* @throws IllegalStateException if the method is called while in a transaction or pipeline context
1236-
*
1237-
* @see HGetExParams
1238-
*/
12391198
@Override
12401199
public List<byte[]> hgetex(byte[] key, HGetExParams params, byte[]... fields){
12411200
checkIsInMultiOrPipeline();
12421201
return connection.executeCommand(commandObjects.hgetex(key, params, fields));
12431202
}
12441203

1245-
/**
1246-
* Retrieves the values associated with the specified fields in the hash stored at the given key
1247-
* and then deletes those fields from the hash.
1248-
*
1249-
* @param key the key of the hash
1250-
* @param fields the fields whose values are to be retrieved and then deleted
1251-
* @return a list of values associated with the specified fields before they were deleted
1252-
* @throws IllegalStateException if the client is in a transaction or pipeline
1253-
*/
12541204
@Override
12551205
public List<byte[]> hgetdel(byte[] key, byte[]... fields){
12561206
checkIsInMultiOrPipeline();
@@ -5761,41 +5711,12 @@ public long hset(final String key, final Map<String, String> hash) {
57615711
return connection.executeCommand(commandObjects.hset(key, hash));
57625712
}
57635713

5764-
/**
5765-
* Sets the specified field in the hash stored at key to the specified value with additional parameters,
5766-
* and optionally set their expiration. Use `HSetExParams` object to specify expiration parameters.
5767-
* This command can overwrite any existing fields in the hash.
5768-
* If key does not exist, a new key holding a hash is created.
5769-
*
5770-
* @param key the key of the hash
5771-
* @param params the parameters for the HSETEX command
5772-
* @param field the field in the hash
5773-
* @param value the value to set
5774-
* @return 0 if no fields were set, 1 if all the fields were set
5775-
* @throws IllegalStateException if the command is executed in a transaction or pipeline context
5776-
*
5777-
* @see HSetExParams
5778-
*/
57795714
@Override
57805715
public long hsetex(String key, HSetExParams params, String field, String value) {
57815716
checkIsInMultiOrPipeline();
57825717
return connection.executeCommand(commandObjects.hsetex(key, params, field, value));
57835718
}
57845719

5785-
/**
5786-
* Sets the specified fields in the hash stored at key to the specified values with additional parameters,
5787-
* and optionally set their expiration. Use `HSetExParams` object to specify expiration parameters.
5788-
* This command can overwrite any existing fields in the hash.
5789-
* If key does not exist, a new key holding a hash is created.
5790-
*
5791-
* @param key the key of the hash
5792-
* @param params the parameters for the HSETEX command
5793-
* @param hash the map containing field-value pairs to set in the hash
5794-
* @return 0 if no fields were set, 1 if all the fields were set
5795-
* @throws IllegalStateException if the command is executed in a transaction or pipeline context
5796-
*
5797-
* @see HSetExParams
5798-
*/
57995720
@Override
58005721
public long hsetex(String key, HSetExParams params, Map<String, String> hash) {
58015722
checkIsInMultiOrPipeline();
@@ -5818,33 +5739,12 @@ public String hget(final String key, final String field) {
58185739
return connection.executeCommand(commandObjects.hget(key, field));
58195740
}
58205741

5821-
/**
5822-
* Retrieves the values associated with the specified fields in a hash stored at the given key
5823-
* and optionally sets their expiration. Use `HGetExParams` object to specify expiration parameters.
5824-
*
5825-
* @param key the key of the hash
5826-
* @param params additional parameters for the HGETEX command
5827-
* @param fields the fields whose values are to be retrieved
5828-
* @return a list of the value associated with each field or nil if the field doesn’t exist.
5829-
* @throws IllegalStateException if the method is called while in a transaction or pipeline context
5830-
*
5831-
* @see HGetExParams
5832-
*/
58335742
@Override
58345743
public List<String> hgetex(String key, HGetExParams params, String... fields) {
58355744
checkIsInMultiOrPipeline();
58365745
return connection.executeCommand(commandObjects.hgetex(key, params, fields));
58375746
}
58385747

5839-
/**
5840-
* Retrieves the values associated with the specified fields in the hash stored at the given key
5841-
* and then deletes those fields from the hash.
5842-
*
5843-
* @param key the key of the hash
5844-
* @param fields the fields whose values are to be retrieved and then deleted
5845-
* @return a list of values associated with the specified fields before they were deleted
5846-
* @throws IllegalStateException if the client is in a transaction or pipeline
5847-
*/
58485748
@Override
58495749
public List<String> hgetdel(String key, String... fields) {
58505750
checkIsInMultiOrPipeline();

src/main/java/redis/clients/jedis/UnifiedJedis.java

Lines changed: 0 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,38 +1479,11 @@ public long hset(String key, Map<String, String> hash) {
14791479
return executeCommand(commandObjects.hset(key, hash));
14801480
}
14811481

1482-
/**
1483-
* Sets the specified fields in the hash stored at key to the specified values with additional parameters,
1484-
* and optionally set their expiration. Use `HSetExParams` object to specify expiration parameters.
1485-
* This command can overwrite any existing fields in the hash.
1486-
* If key does not exist, a new key holding a hash is created.
1487-
*
1488-
* @param key the key of the hash
1489-
* @param params the parameters for the HSETEX command
1490-
* @param field the field in the hash
1491-
* @param value the value to set
1492-
* @return 0 if no fields were set, 1 if all the fields were set
1493-
*
1494-
* @see HSetExParams
1495-
*/
14961482
@Override
14971483
public long hsetex(String key, HSetExParams params, String field, String value) {
14981484
return executeCommand(commandObjects.hsetex(key, params, field, value));
14991485
}
15001486

1501-
/**
1502-
* Sets the specified fields in the hash stored at key to the specified values with additional parameters,
1503-
* and optionally set their expiration. Use `HSetExParams` object to specify expiration parameters.
1504-
* This command can overwrite any existing fields in the hash.
1505-
* If key does not exist, a new key holding a hash is created.
1506-
*
1507-
* @param key the key of the hash
1508-
* @param params the parameters for the HSETEX command
1509-
* @param hash the map containing field-value pairs to set in the hash
1510-
* @return 0 if no fields were set, 1 if all the fields were set
1511-
*
1512-
* @see HSetExParams
1513-
*/
15141487
@Override
15151488
public long hsetex(String key, HSetExParams params, Map<String, String> hash) {
15161489
return executeCommand(commandObjects.hsetex(key, params, hash));
@@ -1521,30 +1494,11 @@ public String hget(String key, String field) {
15211494
return executeCommand(commandObjects.hget(key, field));
15221495
}
15231496

1524-
/**
1525-
* Retrieves the values associated with the specified fields in a hash stored at the given key
1526-
* and optionally sets their expiration. Use `HGetExParams` object to specify expiration parameters.
1527-
*
1528-
* @param key the key of the hash
1529-
* @param params additional parameters for the HGETEX command
1530-
* @param fields the fields whose values are to be retrieved
1531-
* @return a list of the value associated with each field or nil if the field doesn’t exist.
1532-
*
1533-
* @see HGetExParams
1534-
*/
15351497
@Override
15361498
public List<String> hgetex(String key, HGetExParams params, String... fields) {
15371499
return executeCommand(commandObjects.hgetex(key, params, fields));
15381500
}
15391501

1540-
/**
1541-
* Retrieves the values associated with the specified fields in the hash stored at the given key
1542-
* and then deletes those fields from the hash.
1543-
*
1544-
* @param key the key of the hash
1545-
* @param fields the fields whose values are to be retrieved and then deleted
1546-
* @return a list of values associated with the specified fields before they were deleted
1547-
*/
15481502
@Override
15491503
public List<String> hgetdel(String key, String... fields) {
15501504
return executeCommand(commandObjects.hgetdel(key, fields));
@@ -1575,38 +1529,11 @@ public long hset(byte[] key, Map<byte[], byte[]> hash) {
15751529
return executeCommand(commandObjects.hset(key, hash));
15761530
}
15771531

1578-
/**
1579-
* Sets the specified fields in the hash stored at key to the specified values with additional parameters,
1580-
* and optionally set their expiration. Use `HSetExParams` object to specify expiration parameters.
1581-
* This command can overwrite any existing fields in the hash.
1582-
* If key does not exist, a new key holding a hash is created.
1583-
*
1584-
* @param key the key of the hash
1585-
* @param params the parameters for the HSETEX command
1586-
* @param field the field in the hash
1587-
* @param value the value to set
1588-
* @return 0 if no fields were set, 1 if all the fields were set
1589-
*
1590-
* @see HSetExParams
1591-
*/
15921532
@Override
15931533
public long hsetex(byte[] key, HSetExParams params, byte[] field, byte[] value) {
15941534
return executeCommand(commandObjects.hsetex(key, params, field, value));
15951535
}
15961536

1597-
/**
1598-
* Sets the specified fields in the hash stored at key to the specified values with additional parameters,
1599-
* and optionally set their expiration. Use `HSetExParams` object to specify expiration parameters.
1600-
* This command can overwrite any existing fields in the hash.
1601-
* If key does not exist, a new key holding a hash is created.
1602-
*
1603-
* @param key the key of the hash
1604-
* @param params the parameters for the HSETEX command
1605-
* @param hash the map containing field-value pairs to set in the hash
1606-
* @return 0 if no fields were set, 1 if all the fields were set
1607-
*
1608-
* @see HSetExParams
1609-
*/
16101537
@Override
16111538
public long hsetex(byte[] key, HSetExParams params, Map<byte[], byte[]> hash) {
16121539
return executeCommand(commandObjects.hsetex(key, params, hash));
@@ -1617,30 +1544,11 @@ public byte[] hget(byte[] key, byte[] field) {
16171544
return executeCommand(commandObjects.hget(key, field));
16181545
}
16191546

1620-
/**
1621-
* Retrieves the values associated with the specified fields in a hash stored at the given key
1622-
* and optionally sets their expiration. Use `HGetExParams` object to specify expiration parameters.
1623-
*
1624-
* @param key the key of the hash
1625-
* @param params additional parameters for the HGETEX command
1626-
* @param fields the fields whose values are to be retrieved
1627-
* @return a list of the value associated with each field or nil if the field doesn’t exist.
1628-
*
1629-
* @see HGetExParams
1630-
*/
16311547
@Override
16321548
public List<byte[]> hgetex(byte[] key, HGetExParams params, byte[]... fields) {
16331549
return executeCommand(commandObjects.hgetex(key, params, fields));
16341550
}
16351551

1636-
/**
1637-
* Retrieves the values associated with the specified fields in the hash stored at the given key
1638-
* and then deletes those fields from the hash.
1639-
*
1640-
* @param key the key of the hash
1641-
* @param fields the fields whose values are to be retrieved and then deleted
1642-
* @return a list of values associated with the specified fields before they were deleted
1643-
*/
16441552
@Override
16451553
public List<byte[]> hgetdel(byte[] key, byte[]... fields) {
16461554
return executeCommand(commandObjects.hgetdel(key, fields));

src/main/java/redis/clients/jedis/commands/HashBinaryCommands.java

Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,60 @@ public interface HashBinaryCommands {
1616

1717
long hset(byte[] key, Map<byte[], byte[]> hash);
1818

19+
/**
20+
* Sets the specified fields in the hash stored at key to the specified values with additional parameters,
21+
* and optionally set their expiration. Use `HSetExParams` object to specify expiration parameters.
22+
* This command can overwrite any existing fields in the hash.
23+
* If key does not exist, a new key holding a hash is created.
24+
*
25+
* @param key the key of the hash
26+
* @param params the parameters for the HSETEX command
27+
* @param field the field in the hash
28+
* @param value the value to set
29+
* @return 0 if no fields were set, 1 if all the fields were set
30+
*
31+
* @see HSetExParams
32+
*/
1933
long hsetex(byte[] key, HSetExParams params, byte[] field, byte[] value);
2034

35+
/**
36+
* Sets the specified fields in the hash stored at key to the specified values with additional parameters,
37+
* and optionally set their expiration. Use `HSetExParams` object to specify expiration parameters.
38+
* This command can overwrite any existing fields in the hash.
39+
* If key does not exist, a new key holding a hash is created.
40+
*
41+
* @param key the key of the hash
42+
* @param params the parameters for the HSETEX command
43+
* @param hash the map containing field-value pairs to set in the hash
44+
* @return 0 if no fields were set, 1 if all the fields were set
45+
*
46+
* @see HSetExParams
47+
*/
2148
long hsetex(byte[] key, HSetExParams params, Map<byte[], byte[]> hash);
2249

2350
byte[] hget(byte[] key, byte[] field);
2451

52+
/**
53+
* Retrieves the values associated with the specified fields in a hash stored at the given key
54+
* and optionally sets their expiration. Use `HGetExParams` object to specify expiration parameters.
55+
*
56+
* @param key the key of the hash
57+
* @param params additional parameters for the HGETEX command
58+
* @param fields the fields whose values are to be retrieved
59+
* @return a list of the value associated with each field or nil if the field doesn’t exist.
60+
*
61+
* @see HGetExParams
62+
*/
2563
List<byte[]> hgetex(byte[] key, HGetExParams params, byte[]... fields);
26-
64+
65+
/**
66+
* Retrieves the values associated with the specified fields in the hash stored at the given key
67+
* and then deletes those fields from the hash.
68+
*
69+
* @param key the key of the hash
70+
* @param fields the fields whose values are to be retrieved and then deleted
71+
* @return a list of values associated with the specified fields before they were deleted
72+
*/
2773
List<byte[]> hgetdel(byte[] key, byte[]... fields);
2874

2975
long hsetnx(byte[] key, byte[] field, byte[] value);

0 commit comments

Comments
 (0)