Redis Kotlin wrapper based on Jedis
<dependency>
<groupId>com.sxtanna.database</groupId>
<artifactId>Kedis</artifactId>
<version>LATEST</version>
</dependency>
compile "com.sxtanna.database:Kedis:+"
1-0. To create a new instance of Kedis, you would follow this syntax
val kedis = Kedis[file: File]
final Kedis kedis = Kedis.get(file: File);
kedis.enable()
and
kedis.disable()
val resource = kedis.resource()
final Jedis resource = kedis.resource();
Database#resource will throw an IllegalStateException if it's unable to create a resource a/o the database isn't enabled
2-1. Or you could utilize the Database's ability to automatically manage the connection with the invoke methods
kedis {
set("Username", "Sxtanna")
}
kedis.execute(task -> task.set("Username", "Sxtanna"));