Braayy / RedisLib

RedisLib é uma biblioteca para o Redis que facilita sua utilização

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RedisLib

RedisLib is a library for Redis which, even though it is light and simple to use, proves itself to be powerful and efficient. It was created to facilitate the development of applications that use Redis


Topics

References

Use/Examples

Functionalities

Installation

Developers

Contributors

License


References


Use/Examples

import br.com.rabbithole.RedisLibTest;
import br.com.rabbithole.configurations.RedisConfig;
import br.com.rabbithole.core.builder.Query;
import br.com.rabbithole.core.builder.commands.string.Get;
import br.com.rabbithole.core.builder.commands.string.Sets;

import java.util.Optional;

public class Main {
    public static void main(String[] args) {
        //Starts a connection with Redis, passing the connection parameters
        //RedisConfig(prefix, debug, ip, port, user, password, number Of Connections)
        RedisLib.init(new RedisConfig("prefix", false, "localhost", 6379, "user", "password", 100));

        //A simple Get Query
        Query<Get> getQuery = new Get.Builder()
                .setKey("Foo")
                .build();

        //A Get Query execution after construction
        Optional<String> resultOfGetQuery = getQuery.getCommand().execute();

        //A Get Query with execution in the construction
        Optional<String> getQueryWithExecute = new Get.Builder()
                .setKey("Foo")
                .execute();

        //A simple Set Query
        Query<Sets> setQuery = new Sets.Builder()
                .setKey("Foo")
                .setValue("Bar")
                .build();

        //A Set Query execution after construction
        Optional<Boolean> resultOfSetQuery = setQuery.getCommand().execute();

        //A Set Query with execution in the construction
        Optional<Boolean> setQueryWithExecute = new Sets.Builder()
                .setKey("Foo")
                .setValue("Bar")
                .build();
    }
}

Functionalities

"Work in progress"

Installation

  1. Add the repo to your project

Maven:

<repository>
  <id>rabbithole-repo-snapshots</id>
  <name>Rabbit Hole</name>
  <url>https://repo.rabbithole.com.br/snapshots</url>
</repository>

Gradle (Groovy):

maven {
    url "https://repo.rabbithole.com.br/snapshots"
}

Gradle (Kotlin):

maven {
    url = uri("https://repo.rabbithole.com.br/snapshots")
}

  1. Add the dependency

Maven:

<dependency>
  <groupId>br.com.rabbithole</groupId>
  <artifactId>RedisLib</artifactId>
  <version>2.4.0-SNAPSHOT</version>
</dependency>

Gradle (Groovy):

implementation "br.com.rabbithole:RedisLib:2.4.0-SNAPSHOT"

Gradle (Kotlin):

implementation("br.com.rabbithole:RedisLib:2.4.0-SNAPSHOT")

Developers

Felipe Ros Segundo Simão

Contributors

Gabriel Monção Fekete

Murilo Gotardo Pommerening

Artur Chiarello Pozzo

gump


License

MIT


Felipe Ros Segundo Simão OS 2023 - RedisLib


2.5.0

About

RedisLib é uma biblioteca para o Redis que facilita sua utilização

License:MIT License


Languages

Language:Java 100.0%