• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mp911de / lettuce / 1171
87%
master: 92%

Build:
Build:
LAST BUILD BRANCH: 5.x
DEFAULT BRANCH: master
Ran 17 Oct 2016 01:17PM UTC
Jobs 2
Files 298
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
1171

push

travis-ci

mp911de
Investigate on dynamic Redis Commands API

Redis exposes a huge amount of API methods that all available in different command interfaces. Those interfaces carry a lot of different methods with overloads so using the API always requires searching for the right method.

Users can declare their own command interfaces and argument sequences where the command name is derived from the method name or provided with `@Command`. Introduction of new commands does not require users to wait for a new lettuce release but they can invoke commands through own declaration. That interface could be also supporting different key and value types, depending on the use-case.

Commands are executed applying synchronization, asynchronous and in a reactive fashion, depending on the method declaration.

Example:

public interface TestInterface {

    String get(String key); // Synchronous Execution of GET

    @Command("GET")
    byte[] getAsBytes(String key); // Synchronous Execution of GET returning data as byte array

    @Command("SET") // synchronous execution applying a Timeout
    String setSync(String key, String value, Timeout timeout);

    Future<String> set(String key, String value); // asynchronous SET execution

    @Command("SET")
    Mono<String> setReactive(String key, String value); // reactive SET execution using SetArgs

    @CommandNaming(split = DOT) // support for Redis Module command notation -> NR.RUN
    double nrRun(String key, int... indexes);
}

RedisCommandFactory factory = new RedisCommandFactory(connection);

MyRedisCommands commands = factory.getCommands(MyRedisCommands.class);

String value = commands.get("key");

11686 of 13425 relevant lines covered (87.05%)

1.74 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1171.1 (PROFILE=netty-40) 17 Oct 2016 01:18PM UTC 0
86.86
Travis Job 1171.1
2 1171.2 (PROFILE=netty-41) 17 Oct 2016 01:17PM UTC 0
86.93
Travis Job 1171.2
Source Files on build 1171
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1171
  • 0628b600 on github
  • Next Build on issue/371-dynamic-redis-api (#1177)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc