CernVM-FS
2.12.0
|
#include <hash_filter.h>
Public Member Functions | |
SmallhashFilter () | |
void | Fill (const shash::Any &hash) |
bool | Contains (const shash::Any &hash) const |
void | Freeze () |
size_t | Count () const |
Public Member Functions inherited from AbstractHashFilter | |
virtual | ~AbstractHashFilter () |
Static Protected Member Functions | |
static uint32_t | hasher (const shash::Any &key) |
Private Attributes | |
SmallHashDynamic< shash::Any, bool > | hashmap_ |
bool | frozen_ |
This is an implementation of AbstractHashFilter using the SmallHash structure for internal storage.
Definition at line 95 of file hash_filter.h.
|
inline |
|
inlinevirtual |
Decides if a presented hash is in the filter or not Depending on the concrete implementation of this method it could be a prob- abilistic answer. However, implementations should ensure a recall rate of 100%, say: never produce false negatives.
hash | the hash to be queried |
Implements AbstractHashFilter.
Definition at line 115 of file hash_filter.h.
|
inlinevirtual |
Returns the number of objects already inserted into the filter.
Implements AbstractHashFilter.
Definition at line 120 of file hash_filter.h.
|
inlinevirtual |
Adds the given hash to the filter
hash | the hash to be added to the HashFilter |
Implements AbstractHashFilter.
Definition at line 110 of file hash_filter.h.
Referenced by swissknife::CommandGc::Main().
|
inlinevirtual |
Freezes the filter after filling it with all values. This is not necessary but could be used for certain optimizations depending on the implementation of the AbstractHashFilter. Note: After Freeze() has been called, Fill() should fail!
Reimplemented from AbstractHashFilter.
Definition at line 119 of file hash_filter.h.
|
inlinestaticprotected |
Definition at line 97 of file hash_filter.h.
Referenced by SmallhashFilter().
|
private |
Definition at line 124 of file hash_filter.h.
|
private |
Definition at line 123 of file hash_filter.h.
Referenced by Contains(), Count(), Fill(), and SmallhashFilter().