Chisle
코딩 에이전트 플러그인, 20개 실시간 작업에서 기본 모델 52% 활용, 간결한 페르소나와 출력 압축 제공
Redis용 Java 클라이언트
Redis Java client
개발 도구Java · CGitHub @redis직접 설치운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗Jedis is a Java client for Redis designed for performance and ease of use.
Are you looking for a high-level library to handle object mapping? See redis-om-spring!
Learn for free at Redis University
The most recent version of this library supports redis version 7.2, 7.4, 8.0, 8.2, 8.4, 8.6, 8.8 and 8.10.
The table below highlights version compatibility of the most-recent library versions with Redis and JDK versions. Compatibility means communication features, and Redis command capabilities.
| Jedis version | Supported Redis versions | JDK Compatibility |
|---|---|---|
| 3.9+ | 5.0 to 6.2 Family of releases | 8, 11 |
| >= 4.0 | Version 5.0 to 7.2 Family of releases | 8, 11, 17 |
| >= 5.0 | Version 6.0 to current | 8, 11, 17, 21 |
| >= 5.2 | Version 7.2 to current | 8, 11, 17, 21 |
| >= 6.0 | Version 7.2 to current | 8, 11, 17, 21 |
| >= 7.0 | Version 7.2 to current | 8, 11, 17, 21 |
| >= 8.0 | Version 7.2 to current | 8, 11, 17, 21, 25 |
To get started with Jedis, first add it as a dependency in your Java project. If you're using Maven, that looks like this:
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>8.0.1</version>
</dependency>
To use the cutting-edge Jedis, check here.
Next, you'll need to connect to Redis. Consider installing a redis server with docker:
docker run -p 6379:6379 -it redis:latest
You can instantiate a RedisClient like so:
RedisClient jedis = RedisClient.builder().hostAndPort("localhost", 6379).build();
Now you can send commands:
jedis.sadd("planets", "Venus");
Jedis lets you connect to Redis Clusters, supporting the Redis Cluster Specification.
To do this, you'll need to connect using RedisClusterClient. See the example below:
Set<HostAndPort> jedisClusterNodes = new HashSet<HostAndPort>();
jedisClusterNodes.add(new HostAndPort("127.0.0.1", 7379));
jedisClusterNodes.add(new HostAndPort("127.0.0.1", 7380));
RedisClusterClient jedis = RedisClusterClient.builder().nodes(jedisClusterNodes).build();
Now you can use the RedisClusterClient instance and send commands like you would with a standard pooled connection:
jedis.sadd("planets", "Mars");
Jedis includes support for all Redis data types and features such as JSON and VectorSets.
Jedis supports retry and failover for your Redis deployments. This is useful when:
For the complete failover configuration options and examples, see the Jedis failover docs.
Jedis supports Token-Based authentication (TBA) starting with 5.3.0 GA release. This feature is complemented by an extension library that enhances the developer experience and provides most of the components required for TBA functionality.
Notably, the extension library includes built-in support for Microsoft EntraID, offering a seamless integration as part of the generic solution.
For more details and examples, please refer to the Advanced Usage documentation.
The Jedis documentation site contains several useful articles for using Jedis.
You can also check the latest Jedis Javadocs.
Some specific use-case examples can be found in redis.clients.jedis.examples
package of the test source codes.
If you run into trouble or have any questions, we're here to help!
Hit us up on the Redis Discord Server or Jedis GitHub Discussions.
We'd love your contributions!
Bug reports are always welcome! You can open a bug report on GitHub.
To report a security vulnerability, please follow our Security Policy.
You can also contribute documentation -- or anything to improve Jedis. Please see contribution guideline for more details.
Jedis is licensed under the MIT license.