java.lang.Object
io.jooby.redis.RedisModule
- All Implemented Interfaces:
io.jooby.Extension
Redis module: https://jooby.io/modules/redis.
Usage:
{
install(new RedisModule());
get("/", ctx -> {
StatefulRedisConnection redis = require(StatefulRedisConnection.class);
// work with redis
});
}
application.conf:
redis = "redis://localhost:6379"Module is built on top of lettuce. Once installed you are able to work with:
- io.lettuce.core.RedisClient
- io.lettuce.core.api.StatefulRedisConnection
- io.lettuce.core.pubsub.StatefulRedisPubSubConnection
install(new RedisModule("redis://localhost:6379"));
- Since:
- 2.8.5
- Author:
- edgar
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a new redis module.RedisModule(String value) Creates a new redis module. -
Method Summary
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.jooby.Extension
lateinit
-
Constructor Details
-
RedisModule
Creates a new redis module. Value must be: - Valid redis URI; or - Property name- Parameters:
value- Redis URI or property name.
-
RedisModule
public RedisModule()Create a new redis module. The application configuration file must have a redis property, like:redis = "redis://localhost:6379"
-
-
Method Details
-
install
- Specified by:
installin interfaceio.jooby.Extension- Throws:
Exception
-