-
Notifications
You must be signed in to change notification settings - Fork 985
Getting started (3.x)
Mark Paluch edited this page Mar 2, 2016
·
3 revisions
You can get started with lettuce in various ways.
Add these lines to file pom.xml:
<dependency>
<groupId>biz.paluch.redis</groupId>
<artifactId>lettuce</artifactId>
<version>3.4.2.Final</version>
</dependency>
Add these lines to file ivy.xml:
<ivy-module>
<dependencies>
<dependency org="biz.paluch.redis" name="lettuce" rev="3.4.2.Final"/>
</dependencies>
</ivy-module>
Add these lines to file build.gradle:
dependencies {
compile 'biz.paluch.redis:lettuce:3.4.2.Final'
}
Download the latest binary package from https://github.com/mp911de/lettuce/releases and extract the archive
So easy! No more boring routines, we can start.
Import required classes:
import com.lambdaworks.redis.*;
and now, write your code:
RedisClient redisClient = new RedisClient(RedisURI.create("redis://password@localhost:6379/0"));
RedisConnection<String, String> connection = redisClient.connect();
connection.set("key", "Hello, Redis!");
connection.close();
redisClient.shutdown();
Done!
Do you want to see working examples?
Lettuce documentation was moved to https://redis.github.io/lettuce/overview/
Intro
Getting started
- Getting started
- Redis URI and connection details
- Basic usage
- Asynchronous API
- Reactive API
- Publish/Subscribe
- Transactions/Multi
- Scripting and Functions
- Redis Command Interfaces
- FAQ
HA and Sharding
Advanced usage
- Configuring Client resources
- Client Options
- Dynamic Command Interfaces
- SSL Connections
- Native Transports
- Unix Domain Sockets
- Streaming API
- Events
- Command Latency Metrics
- Tracing
- Stateful Connections
- Pipelining/Flushing
- Connection Pooling
- Graal Native Image
- Custom commands
Integration and Extension
Internals