Class BloomFilterMonitor<T>
java.lang.Object
org.forgerock.bloomfilter.monitoring.BloomFilterMonitor<T>
- All Implemented Interfaces:
BloomFilter<T>,BloomFilterMXBean
public final class BloomFilterMonitor<T>
extends Object
implements BloomFilterMXBean, BloomFilter<T>
Generic Bloom Filter JMX monitoring.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the specified element to this set if it is not already possibly present.voidaddAll(Collection<? extends T> elements) Adds all of the specified elements to this set if they are not possibly already present.doublelonglongdoublelongGets a snapshot of the current statistics of the set.booleanmightContain(T element) Checks if the given element might be a member of this set.voidregister()voidregister(MBeanServer mBeanServer) register(MBeanServer mBeanServer, String packageName, String instanceName) toString()
-
Constructor Details
-
BloomFilterMonitor
-
-
Method Details
-
register
public ObjectInstance register(MBeanServer mBeanServer, String packageName, String instanceName) throws InstanceAlreadyExistsException, MBeanRegistrationException, MalformedObjectNameException -
register
public void register(MBeanServer mBeanServer) throws InstanceAlreadyExistsException, MBeanRegistrationException -
register
-
add
Description copied from interface:BloomFilterAdds the specified element to this set if it is not already possibly present. After a call to this method, subsequent calls toBloomFilter.mightContain(Object)will returntruefor the same object.- Specified by:
addin interfaceBloomFilter<T>- Parameters:
element- the element to add to this set.
-
addAll
Description copied from interface:BloomFilterAdds all of the specified elements to this set if they are not possibly already present.- Specified by:
addAllin interfaceBloomFilter<T>- Parameters:
elements- the elements to add to the set.
-
mightContain
Description copied from interface:BloomFilterChecks if the given element might be a member of this set. If this method returnsfalse, then the given object is definitely not a member of the set. If the result istruethen the object may or may not be a member of this set, with a certain probability of false positives.- Specified by:
mightContainin interfaceBloomFilter<T>- Parameters:
element- the element to check for membership in this set.- Returns:
falseif the element is definitely not in the set, ortrueif it might be.
-
getStatistics
Description copied from interface:BloomFilterGets a snapshot of the current statistics of the set.- Specified by:
getStatisticsin interfaceBloomFilter<T>
-
getConfiguredFalsePositiveProbability
public double getConfiguredFalsePositiveProbability()- Specified by:
getConfiguredFalsePositiveProbabilityin interfaceBloomFilterMXBean
-
getExpectedFalsePositiveProbability
public double getExpectedFalsePositiveProbability()- Specified by:
getExpectedFalsePositiveProbabilityin interfaceBloomFilterMXBean
-
getCurrentCapacity
public long getCurrentCapacity()- Specified by:
getCurrentCapacityin interfaceBloomFilterMXBean
-
getEstimatedRemainingCapacity
public long getEstimatedRemainingCapacity()- Specified by:
getEstimatedRemainingCapacityin interfaceBloomFilterMXBean
-
getMemorySizeKB
public long getMemorySizeKB()- Specified by:
getMemorySizeKBin interfaceBloomFilterMXBean
-
getExpiryTime
- Specified by:
getExpiryTimein interfaceBloomFilterMXBean
-
toString
-