Skip to content

Commit

Permalink
Merge branch 'master' into ssl-options
Browse files Browse the repository at this point in the history
  • Loading branch information
sazzad16 authored Dec 19, 2024
2 parents 9d13917 + 90583d0 commit a49ffb1
Show file tree
Hide file tree
Showing 10 changed files with 286 additions and 48 deletions.
33 changes: 23 additions & 10 deletions .github/wordlist.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
!!!Spelling check failed!!!
APM
ARGV
BaseObjectPoolConfig
BFCommands
BaseObjectPoolConfig
BitOP
BitPosParams
BuilderFactory
Expand All @@ -20,10 +20,10 @@ CoreCommands
Dockerfile
EVAL
EVALSHA
Failback
Failover
FTCreateParams
FTSearchParams
Failback
Failover
GSON
GenericObjectPool
GenericObjectPoolConfig
Expand Down Expand Up @@ -54,6 +54,7 @@ ListPosition
Ludovico
Magnocavallo
McCurdy
MkDocs
NOSCRIPT
NUMPAT
NUMPT
Expand All @@ -65,8 +66,10 @@ OpenTracing
Otel
POJO
POJOs
PoolConfig
PubSub
Queable
README
READONLY
RediSearch
RediSearchCommands
Expand All @@ -79,9 +82,11 @@ RedisGraph
RedisInstrumentor
RedisJSON
RedisTimeSeries
Redislabs
SHA
SSLParameters
SSLSocketFactory
SafeEncoder
SearchCommands
SentinelCommands
SentinelConnectionPool
Expand Down Expand Up @@ -126,6 +131,7 @@ bool
boolean
booleans
bysource
cd
charset
clientId
clientKill
Expand All @@ -135,6 +141,7 @@ clusterKeySlot
configs
consumerName
consumername
csc
cumbersome
dbIndex
dbSize
Expand All @@ -159,6 +166,7 @@ geoadd
georadiusByMemberStore
georadiusStore
getbit
github
gmail
groupname
hdel
Expand All @@ -171,20 +179,25 @@ hset
hsetnx
hstrlen
http
https
idx
iff
incr
incrBy
incrByFloat
ini
io
jedis
json
kb
keyslot
keyspace
keysvalues
kllayn
kwarg
lastName
lastsave
learningpath
linsert
linters
llen
Expand All @@ -197,14 +210,13 @@ makeapullrequest
maxLen
maxdepth
maya
md
memberCoordinateMap
mget
microservice
microservices
millisecondsTimestamp
MkDocs
mkdocs
md
mset
msetnx
multikey
Expand All @@ -222,16 +234,18 @@ pexpire
pexpireAt
pfadd
pfcount
pipelining
pmessage
png
pre
produsage
psubscribe
pttl
pubsub
punsubscribe
py
pypi
PoolConfig
qsrk
quickstart
readonly
readwrite
Expand All @@ -242,12 +256,10 @@ reinitialization
renamenx
replicaof
repo
README
rpush
rpushx
runtime
sadd
SafeEncoder
scard
scoreMembers
sdiffstore
Expand All @@ -270,7 +282,6 @@ strlen
stunnel
subcommands
sunionstore
pipelining
thevalueofmykey
timeseries
toctree
Expand All @@ -289,13 +300,16 @@ url
virtualenv
waitReplicas
whenver
wtd
www
xack
xdel
xgroupDelConsumer
xgroupDestroy
xlen
xpx
xtrim
yml
zadd
zcard
zcount
Expand All @@ -322,4 +336,3 @@ zrevrangeByScore
zrevrangeByScoreWithScores
zrevrangeWithScores
zunionstore
yml
21 changes: 21 additions & 0 deletions docs/tutorials_examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Tutorials and Examples

## General

* Redis for Java Developers: <https://university.redis.io/learningpath/kllayn0wtd847i>
* Jedis Guide: <https://redis.io/docs/latest/develop/clients/jedis/>
* Connecting to a Redis server: <https://redis.io/docs/latest/develop/clients/jedis/connect/>
* Using Jedis in production: <https://redis.io/docs/latest/develop/clients/jedis/produsage/>

## Client-side Caching

* Client-side Caching: <https://github.com/Redislabs-Solution-Architects/redis-client-side-caching-csc-jedis-demo>

## JSON

* Store, Read and Search JSON: <https://redis.io/kb/doc/1cd7hi2721/learn-to-store-read-and-search-data-in-json-documents-using-jedis>

## Search

* Vector Search: <https://redis.io/kb/doc/13qsrk8xpx/how-to-perform-vector-search-in-java-with-the-jedis-client-library>
* Spring Boot Search: <https://github.com/Redislabs-Solution-Architects/Spring-Boot-RediSearch-Example>
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ nav:
- Failover: failover.md
- FAQ: faq.md
- API Reference: https://www.javadoc.io/doc/redis.clients/jedis/latest/index.html
- Tutorials and Examples: tutorials_examples.md
- Jedis Guide: https://redis.io/docs/latest/develop/connect/clients/java/jedis/
- Redis Command Reference: https://redis.io/docs/latest/commands/

6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
<jedis.module.name>redis.clients.jedis</jedis.module.name>
<slf4j.version>1.7.36</slf4j.version>
<resilience4j.version>1.7.1</resilience4j.version>
<jackson.version>2.18.1</jackson.version>
<maven.surefire.version>3.5.1</maven.surefire.version>
<jackson.version>2.18.2</jackson.version>
<maven.surefire.version>3.5.2</maven.surefire.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -247,7 +247,7 @@
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.10.1</version>
<version>3.11.2</version>
<configuration>
<source>8</source><!-- Until JDK 11+ -->
<detectJavaApiLink>false</detectJavaApiLink><!-- Until JDK 11+ -->
Expand Down
26 changes: 2 additions & 24 deletions src/main/java/redis/clients/jedis/BuilderFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -975,30 +975,8 @@ public Map<String, CommandDocument> build(Object data) {
}
};

public static final Builder<Map<String, CommandInfo>> COMMAND_INFO_RESPONSE = new Builder<Map<String, CommandInfo>>() {
@Override
public Map<String, CommandInfo> build(Object data) {
if (data == null) {
return null;
}

List<Object> rawList = (List<Object>) data;
Map<String, CommandInfo> map = new HashMap<>(rawList.size());

for (Object rawCommandInfo : rawList) {
if (rawCommandInfo == null) {
continue;
}

List<Object> commandInfo = (List<Object>) rawCommandInfo;
String name = STRING.build(commandInfo.get(0));
CommandInfo info = CommandInfo.COMMAND_INFO_BUILDER.build(commandInfo);
map.put(name, info);
}

return map;
}
};
@Deprecated
public static final Builder<Map<String, CommandInfo>> COMMAND_INFO_RESPONSE = CommandInfo.COMMAND_INFO_RESPONSE;

public static final Builder<Map<String, LatencyLatestInfo>> LATENCY_LATEST_RESPONSE = new Builder<Map<String, LatencyLatestInfo>>() {
@Override
Expand Down
8 changes: 7 additions & 1 deletion src/main/java/redis/clients/jedis/Jedis.java
Original file line number Diff line number Diff line change
Expand Up @@ -8250,7 +8250,13 @@ public List<KeyValue<String, List<String>>> commandGetKeysAndFlags(String... com
public Map<String, CommandInfo> commandInfo(String... commands) {
checkIsInMultiOrPipeline();
connection.sendCommand(COMMAND, joinParameters(Keyword.INFO.name(), commands));
return BuilderFactory.COMMAND_INFO_RESPONSE.build(connection.getOne());
return CommandInfo.COMMAND_INFO_RESPONSE.build(connection.getOne());
}

public Map<String, CommandInfo> command() {
checkIsInMultiOrPipeline();
connection.sendCommand(COMMAND);
return CommandInfo.COMMAND_INFO_RESPONSE.build(connection.getOne());
}

public List<String> commandList() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,10 @@ public AccessControlLogEntry(Map<String, Object> map) {
ageSeconds = (Double) map.get(AGE_SECONDS);
clientInfo = getMapFromRawClientInfo((String) map.get(CLIENT_INFO));
logEntry = map;
entryId = (long) map.get(ENTRY_ID);
timestampCreated = (long) map.get(TIMESTAMP_CREATED);
timestampLastUpdated = (long) map.get(TIMESTAMP_LAST_UPDATED);
// Redis 7.2
entryId = map.containsKey(ENTRY_ID) ? (long) map.get(ENTRY_ID) : -1L;
timestampCreated = map.containsKey(TIMESTAMP_CREATED) ? (long) map.get(TIMESTAMP_CREATED) : -1L;
timestampLastUpdated = map.containsKey(TIMESTAMP_LAST_UPDATED) ? (long) map.get(TIMESTAMP_LAST_UPDATED) : -1L;
}

public long getCount() {
Expand Down
Loading

0 comments on commit a49ffb1

Please sign in to comment.