= LettuceMod :linkattrs: :icons: font :project-owner: redis :project-name: lettucemod :project-group: com.redis :project-version: 4.1.0
image:https://github.com/{project-owner}/{project-name}/actions/workflows/early-access.yml/badge.svg["Build Status",link="https://github.com/{project-owner}/{project-name}/actions/workflows/early-access.yml"] image:https://img.shields.io/maven-central/v/{project-group}/{project-name}[Download,link="https://search.maven.org/#search|ga|1|{project-name}"] image:https://img.shields.io/github/license/{project-owner}/{project-name}["License",link="https://github.com/{project-owner}/{project-name}"] image:https://codecov.io/gh/{project-owner}/{project-name}/branch/master/graph/badge.svg["Coverage", link="https://codecov.io/gh/{project-owner}/{project-name}"]
LettuceMod is a Java client for https://redis.io/docs/about/about-stack/[Redis Stack] based on https://lettuce.io[Lettuce]. It supports the following Redis Stack features:
== Getting Started
=== Java
=== Spring
=== Snapshot Releases
For early-access releases use the following repository:
https://s01.oss.sonatype.org/content/repositories/snapshots/
== Usage
=== Java
==== Standalone Client
<1> Create a modules client <2> Connect to Redis server
==== Cluster Client
<1> Create list of cluster node URIs <2> Create a cluster client <3> Connect to Redis servers <4> Use the sync, async, or reactive API
==== Connection Pool
<1> Create a pool configuration <2> Create the connection pool
=== Spring
==== Client
@Component public class MyComponent {
@Autowired
StatefulRedisModulesConnection<String, String> connection;
// ...
==== Connection Pool
@Component public class MyComponent {
@Autowired
GenericObjectPool<StatefulRedisModulesConnection<String, String>> pool;
// ...
=== Commands
RedisModulesCommands<String, String> commands = connection.sync();
// JSON.SET commands.jsonSet("arr", ".", "[1,2,3]");
// FT.CREATE commands.ftCreate("beers", Field.text("name").build(), Field.numeric("ibu").build());
// FT.SEARCH commands.ftSearch("beers", "chou*");
// TS.ADD commands.tsAdd("temp:3:11", Sample.of(1548149181, 30));
// BF.EXISTS commands.bfExists("bloom:1", "test");
// CF.EXISTS commands.cfExists("cuckoo:1", "one");
// CMS.QUERY commands.cmsQuery("cms:1", "one", "two", "three");
// TDIGEST.RANK commands.tDigestRank("tdigest:1", -5, 100, 5.3);
=== Pipelining
<1> Disable auto-flushing <2> Perform a series of independent calls <3> Write all commands to the transport layer <4> Synchronization example: Wait until all futures complete <5> Later
=== Connection Pooling
<1> Create a pool configuration <2> Create the connection pool <3> Get connection from pool. Try-with automatically closes connection which returns it to pool <4> Use sync, async, or reactive commands