Redis-launcher is a Java library for controlling a redis server programmatically. It is released under the MIT license.
Installation
Installing from Maven Central
<dependency>
<groupId>uk.co.datumedge</groupId>
<artifactId>redis-launcher</artifactId>
<version>0.3</version>
</dependency>
Installing from source
mvn -Dredislauncher.command=/path/to/redis-server install
Getting started
The simplest way to start a redis server is to set the redislauncher.command
system property as the path to the redis-server executable, then use the following code:
RedisServer redisServer = LocalRedisServer.newInstance();
try {
redisServer.start();
...
} finally {
redisServer.stop();
}