-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathRedisBloomFactoryInterface.php
70 lines (62 loc) · 2.21 KB
/
RedisBloomFactoryInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<?php
/**
* @project phpredis-bloom
* @author Rafael Campoy <rafa.campoy@gmail.com>
* @copyright 2019 Rafael Campoy <rafa.campoy@gmail.com>
* @license MIT
* @link https://github.com/averias/phpredis-bloom
*
* Copyright and license information, is included in
* the LICENSE file that is distributed with this source code.
*/
namespace Averias\RedisBloom\Factory;
use Averias\RedisBloom\Adapter\RedisClientAdapterInterface;
use Averias\RedisBloom\Client\RedisBloomClientInterface;
use Averias\RedisBloom\DataTypes\BloomFilterInterface;
use Averias\RedisBloom\DataTypes\CountMinSketchInterface;
use Averias\RedisBloom\DataTypes\CuckooFilterInterface;
use Averias\RedisBloom\DataTypes\TopKInterface;
use Averias\RedisBloom\Exception\RedisClientException;
interface RedisBloomFactoryInterface
{
/**
* @param array|null $config
* @return RedisClientAdapterInterface
* @throws RedisClientException
*/
public function getAdapter(?array $config = null): RedisClientAdapterInterface;
/**
* @param array|null $config
* @return RedisBloomClientInterface
* @throws RedisClientException
*/
public function createClient(?array $config = null): RedisBloomClientInterface;
/**
* @param string $filterName
* @param array|null $config
* @return BloomFilterInterface
* @throws RedisClientException
*/
public function createBloomFilter(string $filterName, ?array $config = null): BloomFilterInterface;
/**
* @param string $filterName
* @param array|null $config
* @return CuckooFilterInterface
* @throws RedisClientException
*/
public function createCuckooFilter(string $filterName, ?array $config = null): CuckooFilterInterface;
/**
* @param string $filterName
* @param array|null $config
* @return TopKInterface
* @throws RedisClientException
*/
public function createTopK(string $filterName, ?array $config = null): TopKInterface;
/**
* @param string $filterName
* @param array|null $config
* @return CountMinSketchInterface
* @throws RedisClientException
*/
public function createCountMinSketch(string $filterName, ?array $config = null): CountMinSketchInterface;
}