44import java .util .*;
55import java .util .stream .Collectors ;
66
7- import redis .clients .jedis .resps .StreamConsumerFullInfo ;
8- import redis .clients .jedis .resps .StreamFullInfo ;
9- import redis .clients .jedis .resps .StreamGroupFullInfo ;
7+ import redis .clients .jedis .resps .*;
108import redis .clients .jedis .resps .LCSMatchResult .MatchedPosition ;
119import redis .clients .jedis .resps .LCSMatchResult .Position ;
12- import redis .clients .jedis .resps .*;
1310import redis .clients .jedis .util .DoublePrecision ;
1411import redis .clients .jedis .util .JedisByteHashMap ;
1512import redis .clients .jedis .util .KeyValue ;
@@ -200,36 +197,6 @@ public String toString() {
200197 }
201198 };
202199
203- // TODO: remove
204- public static final Builder <byte []> BYTE_ARRAY = new Builder <byte []>() {
205- @ Override
206- public byte [] build (Object data ) {
207- return ((byte []) data );
208- }
209-
210- @ Override
211- public String toString () {
212- return "byte[]" ;
213- }
214- };
215-
216- // TODO: remove
217- public static final Builder <List <byte []>> BYTE_ARRAY_LIST = new Builder <List <byte []>>() {
218- @ Override
219- @ SuppressWarnings ("unchecked" )
220- public List <byte []> build (Object data ) {
221- if (null == data ) {
222- return null ;
223- }
224- return (List <byte []>) data ;
225- }
226-
227- @ Override
228- public String toString () {
229- return "List<byte[]>" ;
230- }
231- };
232-
233200 public static final Builder <byte []> BINARY = new Builder <byte []>() {
234201 @ Override
235202 public byte [] build (Object data ) {
@@ -308,7 +275,7 @@ public Map<byte[], byte[]> build(Object data) {
308275
309276 @ Override
310277 public String toString () {
311- return "Map<String, String >" ;
278+ return "Map<byte[], byte[] >" ;
312279 }
313280 };
314281
@@ -977,7 +944,7 @@ private Map<String, Builder> createDecoderMap() {
977944 tempMappingFunctions .put (AccessControlLogEntry .CONTEXT , STRING );
978945 tempMappingFunctions .put (AccessControlLogEntry .OBJECT , STRING );
979946 tempMappingFunctions .put (AccessControlLogEntry .USERNAME , STRING );
980- // tempMappingFunctions.put(AccessControlLogEntry.AGE_SECONDS, STRING );
947+ tempMappingFunctions .put (AccessControlLogEntry .AGE_SECONDS , DOUBLE );
981948 tempMappingFunctions .put (AccessControlLogEntry .CLIENT_INFO , STRING );
982949 tempMappingFunctions .put (AccessControlLogEntry .ENTRY_ID , LONG );
983950 tempMappingFunctions .put (AccessControlLogEntry .TIMESTAMP_CREATED , LONG );
@@ -1174,7 +1141,7 @@ public List<Map.Entry<String, List<StreamEntry>>> build(Object data) {
11741141 List <Object > stream = (List <Object >) streamObj ;
11751142 String streamKey = STRING .build (stream .get (0 ));
11761143 List <StreamEntry > streamEntries = STREAM_ENTRY_LIST .build (stream .get (1 ));
1177- result .add (new AbstractMap . SimpleEntry <> (streamKey , streamEntries ));
1144+ result .add (KeyValue . of (streamKey , streamEntries ));
11781145 }
11791146
11801147 return result ;
@@ -1198,7 +1165,7 @@ public List<Map.Entry<String, List<StreamEntry>>> build(Object data) {
11981165 while (iter .hasNext ()) {
11991166 String streamKey = STRING .build (iter .next ());
12001167 List <StreamEntry > streamEntries = STREAM_ENTRY_LIST .build (iter .next ());
1201- result .add (new AbstractMap . SimpleEntry <> (streamKey , streamEntries ));
1168+ result .add (KeyValue . of (streamKey , streamEntries ));
12021169 }
12031170
12041171 return result ;
0 commit comments