<commit_before>ddth-redis
==========

DDTH's [Redis](http://redis.io/) Libraries and Utilities: simplify Redis's usage.

Project home:
[https://github.com/DDTH/ddth-redis](https://github.com/DDTH/ddth-redis)

OSGi environment: `ddth-redis` is packaged as an OSGi bundle.


## License ##

See LICENSE.txt for details. Copyright (c) 2014 <NAME>.

Third party libraries are distributed under their own licenses.


## Installation #

Latest release version: `0.1.0.1`. See [RELEASE-NOTES.md](RELEASE-NOTES.md).

Maven dependency:

```xml
<dependency>
	<groupId>com.github.ddth</groupId>
	<artifactId>ddth-redis</artifactId>
	<version>0.1.0.1</version>
</dependency>
```


## Usage ##

Simple usage:

```java
// obtain a redis client factory
RedisClientFactory factory = RedisClientFactory.newFactory();

// obtain a redis client object from pool
IRedisClient client = factory.getRedisClient("localhost");
IRedisClient client = factory.getRedisClient("localhost", 6379);
IRedisClient client = factory.getRedisClient("localhost", 6379, "user", "password");
IRedisClient client = factory.getRedisClient("localhost", 6379, "user", "password", poolConfig);

//do something with the client
client.set("key", "value", ttl);
...

client.close(); //close and return the client to pool when done

factory.destroy(); //destroy the factory when done
```

<commit_msg>Minor update<commit_after>ddth-redis
==========

DDTH's [Redis](http://redis.io/) Libraries and Utilities: simplify Redis's usage.

Project home:
[https://github.com/DDTH/ddth-redis](https://github.com/DDTH/ddth-redis)

OSGi environment: `ddth-redis` is packaged as an OSGi bundle.


## License ##

See LICENSE.txt for details. Copyright (c) 2014 <NAME>.

Third party libraries are distributed under their own licenses.


## Installation #

Latest release version: `0.1.0.1`. See [RELEASE-NOTES.md](RELEASE-NOTES.md).

Maven dependency:

```xml
<dependency>
	<groupId>com.github.ddth</groupId>
	<artifactId>ddth-redis</artifactId>
	<version>0.1.0.1</version>
</dependency>
```


## Usage ##

```java
// obtain a redis client factory
RedisClientFactory factory = RedisClientFactory.newFactory();

// obtain a redis client object from pool
IRedisClient client = factory.getRedisClient("localhost");
IRedisClient client = factory.getRedisClient("localhost", 6379);
IRedisClient client = factory.getRedisClient("localhost", 6379, "user", "password");
IRedisClient client = factory.getRedisClient("localhost", 6379, "user", "password", poolConfig);

//do something with the client
client.set("key", "value", ttl);
...

client.close(); //close and return the client to pool when done

factory.destroy(); //destroy the factory when done
```


{'fraction_non_alphanumeric': 0.1530156366344006, 'fraction_numerical': 0.017870439314966492, 'mean_word_length': 5.065462753950339, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '155994', 'n_tokens_mistral': 928, 'n_tokens_neox': 844, 'n_words': 233}