redis-java

An in-memory redis-compatible implementation written in pure Java

License

License

Categories

Categories

Java Languages Redis Data Databases
GroupId

GroupId

org.rarefiedredis.redis
ArtifactId

ArtifactId

redis-java
Last Version

Last Version

0.0.17
Release Date

Release Date

Type

Type

jar
Description

Description

redis-java
An in-memory redis-compatible implementation written in pure Java
Project URL

Project URL

http://maven.apache.org
Source Code Management

Source Code Management

https://github.com/wilkenstein/redis-mock-java

Download redis-java

How to add to project

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

Dependencies

compile (2)

Group / Artifact Type Version
redis.clients : jedis jar 2.6.2
org.luaj : luaj-jse jar 3.0

test (1)

Group / Artifact Type Version
junit : junit jar 4.11

Project Modules

There are no modules declared in this project.

redis-mock-java

An in-memory redis-compatible implementation written in pure Java. Part of the Rarefied Redis Project.

Status

Build Status

Installation

maven

<dependency>
  <groupId>org.rarefiedredis.redis</groupId>
  <artifactId>redis-java</artifactId>
  <version>0.0.5</version>
</dependency>

Usage

TODO

Thread Safety

The RedisMock object is itself completely thread-safe. Every command is synchronized on the object, so the internal data structures can never run into concurrent modifications.

Because of the way RedisMock operates, we cannot, say, clone this object and maintain thread-safety. If two RedisMock objects were to share the same internal data structures, it would be possible for a concurrent modification to occur between the two objects. Thus, clone is unsupported on RedisMock.

Supported Commands

The goal is to have one-to-one feature parity with all redis commands, so that this implementation can simply be dropped into an existing redis-backed codebase. Redis has a lot of commands! Some of them are easy, and some are quite complex.

Version 0.1.0 should have support for almost all redis commands, minus the hyperloglog commands and the key-movement commands, such as migrate.

To find out what commands a particular version of redis-java supports, run the following commands:

TODO

Contributing

All contributions welcome! Issues or Pull Requests. For PRs, mvn test must succeed and test the new code before the PR will be considered.

Testing

This project uses maven.

To run the full test suite from source, issue the standard maven command:

$ mvn test

Roadmap

  • 0.1.0
    • Support for most redis commands.
    • Unit tests for all supported commands.
  • 1.0.0
    • Support for different versions of mock redis that mimic different redis versions.
    • Lua scripting support.
  • 2.0.0
    • Support for migrating data from a mock redis instance to a real redis instance.
    • Support for persisting a mock redis instance.
    • HyperLogLog support.

Versions

  • 0.0.16
    • Implement ttl & pttl.
  • 0.0.15
    • Implement all sorted set commands.
    • Fix the JedisIRedisClient with sorted set commands.
  • 0.0.14
    • Fix the JedisIRedisClient entirely to disallow watches with pools.
  • 0.0.13
    • Attempt to fix a deadlock condition in JedisIRedisClient & Multi.
  • 0.0.12
  • 0.0.11
  • 0.0.10
    • Preliminary unit-tests on lua scripting.
    • Fix ConcurrentModificationException bug in ltrim.
  • 0.0.9
    • Hotfix for NullPointerException in smove in AbstractJedisIRedisClientAdapter.
  • 0.0.8
    • Implement transaction commands in JedisIRedisClientAdapter.
    • Unit-test transaction commands in JedisIRedisClientAdater.
    • Implement hash commands in JedisIRedisClientAdapter.
    • Unit-test hash commands in JedisIRedisClientAdater.
  • 0.0.7
    • Fix JedisIRedisClientAdapter bug with primitive data types, e.g., Longs vs longs.
    • Implement more commands in JedisIRedisClientAdapter.
    • Integration test JedisIRedisClientAdapter against redis.
    • Bug fixes.
  • 0.0.6
    • Fix multi bug with primitive data types, e.g., Longs vs longs.
    • Lua scripting support started.
  • 0.0.5
    • All transaction commands implemented.
    • All transaction commands unit-tested.
    • Jedis adapters implemented.
    • Preliminary unit-tests on jedis adapters.
  • 0.0.4
    • All hash commands implemented.
    • All hash commands unit-tested.
  • 0.0.3
    • All set commands implemented.
    • All set commands unit-tested.
  • 0.0.2
    • All list commands implemented.
    • All list commands unit-tested.
  • 0.0.1
    • All string commands implemented.
    • All string commands unit-tested.

Versions

Version
0.0.17
0.0.16
0.0.15
0.0.14
0.0.13
0.0.12
0.0.11
0.0.10
0.0.9
0.0.8
0.0.7
0.0.6
0.0.5
0.0.4
0.0.2