cartier-redis

Advanced and thread-safe Java Redis client for synchronous, asynchronous, and reactive usage. Supports Cluster, Sentinel, Pipelining, Auto-Reconnect, Codecs and much more.

Лицензия

Лицензия

Категории

Категории

Redis Данные Базы данных
Группа

Группа

xyz.vopen.cartier
Идентификатор

Идентификатор

cartier-redis
Последняя версия

Последняя версия

4.5.0-RELEASE
Дата

Дата

Тип

Тип

jar
Описание

Описание

cartier-redis
Advanced and thread-safe Java Redis client for synchronous, asynchronous, and reactive usage. Supports Cluster, Sentinel, Pipelining, Auto-Reconnect, Codecs and much more.
Ссылка на сайт

Ссылка на сайт

http://github.com/lettuce-io/lettuce-core
Организация-разработчик

Организация-разработчик

lettuce.io
Система контроля версий

Система контроля версий

http://github.com/lettuce-io/lettuce-core

Скачать cartier-redis

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/xyz.vopen.cartier/cartier-redis/ -->
<dependency>
    <groupId>xyz.vopen.cartier</groupId>
    <artifactId>cartier-redis</artifactId>
    <version>4.5.0-RELEASE</version>
</dependency>
// https://jarcasting.com/artifacts/xyz.vopen.cartier/cartier-redis/
implementation 'xyz.vopen.cartier:cartier-redis:4.5.0-RELEASE'
// https://jarcasting.com/artifacts/xyz.vopen.cartier/cartier-redis/
implementation ("xyz.vopen.cartier:cartier-redis:4.5.0-RELEASE")
'xyz.vopen.cartier:cartier-redis:jar:4.5.0-RELEASE'
<dependency org="xyz.vopen.cartier" name="cartier-redis" rev="4.5.0-RELEASE">
  <artifact name="cartier-redis" type="jar" />
</dependency>
@Grapes(
@Grab(group='xyz.vopen.cartier', module='cartier-redis', version='4.5.0-RELEASE')
)
libraryDependencies += "xyz.vopen.cartier" % "cartier-redis" % "4.5.0-RELEASE"
[xyz.vopen.cartier/cartier-redis "4.5.0-RELEASE"]

Зависимости

compile (14)

Идентификатор библиотеки Тип Версия
io.reactivex : rxjava jar 1.3.0
io.netty : netty-common jar
io.netty : netty-transport jar
io.netty : netty-handler jar
io.netty : netty-transport-native-epoll Необязательный jar
io.netty : netty-tcnative Необязательный jar 1.1.33.Fork26
com.google.guava : guava jar 19.0
org.apache.commons : commons-pool2 Необязательный jar 2.4.2
org.latencyutils : LatencyUtils Необязательный jar 2.0.3
org.springframework : spring-beans Необязательный jar
org.springframework : spring-context Необязательный jar
javax.inject : javax.inject Необязательный jar 1
javax.enterprise : cdi-api Необязательный jar 1.0
com.google.code.findbugs : jsr305 Необязательный jar 3.0.1

test (17)

Идентификатор библиотеки Тип Версия
org.springframework : spring-core jar
org.springframework : spring-aop jar
junit : junit jar 4.11
com.googlecode.multithreadedtc : multithreadedtc jar 1.01
org.mockito : mockito-core jar 2.8.47
com.google.code.tempus-fugit : tempus-fugit jar 1.1
org.apache.openwebbeans.test : cditest-owb jar 1.2.8
javax.servlet : javax.servlet-api jar 3.1.0
org.assertj : assertj-core jar 3.8.0
org.apache.logging.log4j : log4j-core jar 2.8.2
org.apache.logging.log4j : log4j-slf4j-impl jar 2.8.2
org.slf4j : jcl-over-slf4j jar 1.7.25
org.springframework : spring-test jar
org.springframework : spring-expression jar 4.3.10.RELEASE
org.hamcrest : hamcrest-library jar 1.3
com.github.javaparser : javaparser-core jar 2.5.1
org.apache.commons : commons-lang3 jar 3.6

Модули Проекта

Данный проект не имеет модулей.

Lettuce - Advanced Java Redis client

Build Status codecov Maven Central

Lettuce is a scalable thread-safe Redis client for synchronous, asynchronous and reactive usage. Multiple threads may share one connection if they avoid blocking and transactional operations such as BLPOP and MULTI/EXEC. Lettuce is built with netty. Supports advanced Redis features such as Sentinel, Cluster, Pipelining, Auto-Reconnect and Redis data models.

This version of Lettuce has been tested against the latest Redis source-build.

See the reference documentation and Wiki for more details.

Communication

Documentation

Binaries/Download

Binaries and dependency information for Maven, Ivy, Gradle and others can be found at http://search.maven.org.

Releases of lettuce are available in the Maven Central repository. Take also a look at the Releases.

Example for Maven:

<dependency>
  <groupId>io.lettuce</groupId>
  <artifactId>lettuce-core</artifactId>
  <version>x.y.z</version>
</dependency>

If you'd rather like the latest snapshots of the upcoming major version, use our Maven snapshot repository and declare the appropriate dependency version.

<dependency>
  <groupId>io.lettuce</groupId>
  <artifactId>lettuce-core</artifactId>
  <version>x.y.z.BUILD-SNAPSHOT</version>
</dependency>

<repositories>
  <repository>
    <id>sonatype-snapshots</id>
    <name>Sonatype Snapshot Repository</name>
    <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
    <snapshots>
      <enabled>true</enabled>
    </snapshots>
  </repository>
</repositories>

Basic Usage

RedisClient client = RedisClient.create("redis://localhost");
StatefulRedisConnection<String, String> connection = client.connect();
RedisStringCommands sync = connection.sync();
String value = sync.get("key");

Each Redis command is implemented by one or more methods with names identical to the lowercase Redis command name. Complex commands with multiple modifiers that change the result type include the CamelCased modifier as part of the command name, e.g. zrangebyscore and zrangebyscoreWithScores.

See Basic usage for further details.

Asynchronous API

StatefulRedisConnection<String, String> connection = client.connect();
RedisStringAsyncCommands<String, String> async = connection.async();
RedisFuture<String> set = async.set("key", "value")
RedisFuture<String> get = async.get("key")

async.awaitAll(set, get) == true

set.get() == "OK"
get.get() == "value"

See Asynchronous API for further details.

Reactive API

StatefulRedisConnection<String, String> connection = client.connect();
RedisStringReactiveCommands<String, String> reactive = connection.reactive();
Mono<String> set = reactive.set("key", "value");
Mono<String> get = reactive.get("key");

set.subscribe();

get.block() == "value"

See Reactive API for further details.

Pub/Sub

RedisPubSubCommands<String, String> connection = client.connectPubSub().sync();
connection.getStatefulConnection().addListener(new RedisPubSubListener<String, String>() { ... })
connection.subscribe("channel")

Cloud Provider Compatibility

While we're not actively testing Lettuce against various cloud offerings, we've verified initial compatibility with the following services (or have seen folks using Lettuce there):

  • AWS Elasticache (Operated in replica- and Redis Cluster mode)
  • Azure Redis
  • IBM Cloud Databases for Redis
  • Google Cloud Memorystore for Redis
  • RedisLabs Enterprise Redis Cluster

Note: Some providers operate Redis in non-standard modes that aren't fully supported by Lettuce.

Building

Lettuce is built with Apache Maven. The tests require multiple running Redis instances for different test cases which are configured using a Makefile. Tests run by default against Redis unstable.

To build:

$ git clone https://github.com/lettuce-io/lettuce-core.git
$ cd lettuce/
$ make prepare ssl-keys
$ make test
  • Initial environment setup (clone and build redis): make prepare
  • Setup SSL Keys: make ssl-keys
  • Run the build: make test
  • Start Redis (manually): make start
  • Stop Redis (manually): make stop

Bugs and Feedback

For bugs, questions and discussions please use the GitHub Issues.

License

Contributing

Github is for social coding: if you want to write code, I encourage contributions through pull requests from forks of this repository. Create Github tickets for bugs and new features and comment on the ones that you are interested in and take a look into CONTRIBUTING.md

xyz.vopen.cartier

Lettuce

Lettuce is a scalable Redis client for building non-blocking Reactive applications.

Версии библиотеки

Версия
4.5.0-RELEASE