# JRedisBloom
**Repository Path**: wise_conduct/JRedisBloom
## Basic Information
- **Project Name**: JRedisBloom
- **Description**: Java Client for RedisBloom probabilistic module
- **Primary Language**: Unknown
- **License**: BSD-2-Clause
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 1
- **Created**: 2020-03-13
- **Last Updated**: 2021-11-23
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
[](https://github.com/RedisBloom/JRedisBloom)
[](https://github.com/RedisBloom/JRedisBloom/releases/latest)
[](https://circleci.com/gh/RedisBloom/JRedisBloom/tree/master)
[](https://maven-badges.herokuapp.com/maven-central/com.redislabs/jrebloom)
[](https://www.javadoc.io/doc/com.redislabs/jrebloom)
[](https://codecov.io/gh/RedisBloom/JRedisBloom)
[](https://lgtm.com/projects/g/RedisBloom/JRedisBloom/context:java)
# JRedisBloom
A Java Client Library for [RedisBloom](https://redisbloom.io)
## Overview
This project contains a Java library abstracting the API of the RedisBloom Redis module, that implements a high
performance bloom filter with an easy-to-use API
See [http://redisbloom.io](http://redisbloom.io) for installation instructions of the module.
### Official Releases
```xml
com.redislabs
jrebloom
1.2.0
```
### Snapshots
```xml
snapshots-repo
https://oss.sonatype.org/content/repositories/snapshots
```
and
```xml
com.redislabs
jrebloom
2.0.0-SNAPSHOT
```
## Usage example
Initializing the client:
```java
import io.rebloom.client.Client
Client client = new Client("localhost", 6378);
```
Adding items to a bloom filter (created using default settings):
```java
client.add("simpleBloom", "Mark");
// Does "Mark" now exist?
client.exists("simpleBloom", "Mark"); // true
client.exists("simpleBloom", "Farnsworth"); // False
```
Use multi-methods to add/check multiple items at once:
```java
client.addMulti("simpleBloom", "foo", "bar", "baz", "bat", "bag");
// Check if they exist:
boolean[] rv = client.existsMulti("simpleBloom", "foo", "bar", "baz", "bat", "mark", "nonexist");
```
Reserve a customized bloom filter:
```java
client.createFilter("specialBloom", 10000, 0.0001);
client.add("specialBloom", "foo");
```
Use cluster client to call redis cluster
Initializing the cluster client:
```java
Set jedisClusterNodes = new HashSet<>();
jedisClusterNodes.add(new HostAndPort("localhost", 7000));
ClusterClient cclient = new ClusterClient(jedisClusterNodes);
```
Adding items to a bloom filter (created using default settings):
```java
cclient.add("simpleBloom", "Mark");
// Does "Mark" now exist?
cclient.exists("simpleBloom", "Mark"); // true
cclient.exists("simpleBloom", "Farnsworth"); // False
```
all method of ClusterClient is same to Client.