| Safe Haskell | Trustworthy |
|---|---|
| Language | Haskell2010 |
Data.RedisBloom
Contents
Description
A bloom filter for the Redis in-memory store.
Synopsis
- newtype HashCount = HashCount Int
- newtype Capacity = Capacity Int
- type Key = ByteString
- data Bloom a = Bloom {}
- createBF :: RedisCtx m (Either Reply) => Bloom a -> m (Either Reply Status)
- createIfNewBF :: RedisCtx m (Either Reply) => Bloom a -> m (Either Reply Bool)
- addBF :: RedisCtx m f => Bloom a -> a -> m ()
- queryBF :: (MonadRedis m, RedisCtx m (Either Reply)) => Bloom a -> a -> m Bool
Bloom filter configuration
Fundamental types
Number of hashes to use in a bloom filter.
Constructors
| HashCount Int |
Instances
| Bounded HashCount Source # | |
Defined in Data.RedisBloom.Internal | |
| Enum HashCount Source # | |
Defined in Data.RedisBloom.Internal | |
| Eq HashCount Source # | |
| Integral HashCount Source # | |
Defined in Data.RedisBloom.Internal | |
| Num HashCount Source # | |
| Ord HashCount Source # | |
Defined in Data.RedisBloom.Internal | |
| Real HashCount Source # | |
Defined in Data.RedisBloom.Internal Methods toRational :: HashCount -> Rational | |
| Show HashCount Source # | |
| Generic HashCount Source # | |
| type Rep HashCount Source # | |
Defined in Data.RedisBloom.Internal type Rep HashCount = D1 (MetaData "HashCount" "Data.RedisBloom.Internal" "bloomfilter-redis-0.1.0.4-inplace" True) (C1 (MetaCons "HashCount" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))) | |
Capacity of a bloom filter.
Constructors
| Capacity Int |
Instances
| Enum Capacity Source # | |
Defined in Data.RedisBloom.Internal | |
| Eq Capacity Source # | |
| Integral Capacity Source # | |
Defined in Data.RedisBloom.Internal | |
| Num Capacity Source # | |
| Ord Capacity Source # | |
Defined in Data.RedisBloom.Internal | |
| Real Capacity Source # | |
Defined in Data.RedisBloom.Internal Methods toRational :: Capacity -> Rational | |
| Show Capacity Source # | |
| Generic Capacity Source # | |
| type Rep Capacity Source # | |
Defined in Data.RedisBloom.Internal type Rep Capacity = D1 (MetaData "Capacity" "Data.RedisBloom.Internal" "bloomfilter-redis-0.1.0.4-inplace" True) (C1 (MetaCons "Capacity" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int))) | |
Static bloom filter configuration
Bloom filter static configuration.
To use suggested values based on the desired
false-positive rate and capacity, use suggestCreate.
Constructors
| Bloom | |
Fields
| |
Bloom filter operations
createBF :: RedisCtx m (Either Reply) => Bloom a -> m (Either Reply Status) Source #
Create a new bloom filter with the specified configuration.
createIfNewBF :: RedisCtx m (Either Reply) => Bloom a -> m (Either Reply Bool) Source #
Create a new bloom filter with the specified configuration if the specified key does not yet exist.