public class DecayingHashSet extends DecayingBloomFilter
_context, _currentDuplicates, _decayEvent, _durationMs, _entryBytes, _keepDecaying, _log, _name, _reorganizeLock| コンストラクタ | 説明 |
|---|---|
DecayingHashSet(I2PAppContext context,
int durationMs,
int entryBytes) |
Create a double-buffered hash set that will decay its entries over time.
|
DecayingHashSet(I2PAppContext context,
int durationMs,
int entryBytes,
java.lang.String name) |
| 修飾子とタイプ | メソッド | 説明 |
|---|---|---|
boolean |
add(byte[] entry,
int off,
int len) |
|
boolean |
add(long entry) |
|
void |
clear() |
|
protected void |
decay() |
|
double |
getFalsePositiveRate() |
pointless, only used for logging elsewhere
|
int |
getInsertedCount() |
unsynchronized but only used for logging elsewhere
|
boolean |
isKnown(long entry) |
|
void |
stopDecaying() |
super doesn't call clear, but neither do the users, so it seems like we should here
|
add, getCurrentDuplicateCount, getReadLock, getWriteLock, releaseReadLock, releaseWriteLockpublic DecayingHashSet(I2PAppContext context, int durationMs, int entryBytes)
durationMs - entries last for at least this long, but no more than twice this longentryBytes - how large are the entries to be added? 1 to 32 bytespublic DecayingHashSet(I2PAppContext context, int durationMs, int entryBytes, java.lang.String name)
name - just for logging / debugging / statspublic int getInsertedCount()
getInsertedCount クラス内 DecayingBloomFilterpublic double getFalsePositiveRate()
getFalsePositiveRate クラス内 DecayingBloomFilterpublic boolean add(byte[] entry,
int off,
int len)
add クラス内 DecayingBloomFilterpublic boolean add(long entry)
add クラス内 DecayingBloomFilterpublic boolean isKnown(long entry)
isKnown クラス内 DecayingBloomFilterpublic void clear()
clear クラス内 DecayingBloomFilterpublic void stopDecaying()
stopDecaying クラス内 DecayingBloomFilterprotected void decay()
decay クラス内 DecayingBloomFilter