Class FilterMerger
- java.lang.Object
- 
- org.bitcoinj.net.FilterMerger
 
- 
 public class FilterMerger extends java.lang.ObjectA reusable object that will calculate, given a list of PeerFilterProviders, a mergedBloomFilterand earliest key time for all of them. Used by thePeerGroupclass internally.Thread safety: threading here can be complicated. Each filter provider is given a begin event, which may acquire a lock (and is guaranteed to receive an end event). This class is mostly thread unsafe and is meant to be used from a single thread only, PeerGroup ensures this by only accessing it from the dedicated PeerGroup thread. PeerGroup does not hold any locks whilst this object is used, relying on the single thread to prevent multiple filters being calculated in parallel, thus a filter provider can do things like make blocking calls into PeerGroup from a separate thread. However the bloomFilterFPRate property IS thread safe, for convenience. 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classFilterMerger.Result
 - 
Constructor SummaryConstructors Constructor Description FilterMerger(double bloomFilterFPRate)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description FilterMerger.Resultcalculate(com.google.common.collect.ImmutableList<PeerFilterProvider> providers)doublegetBloomFilterFPRate()BloomFiltergetLastFilter()voidsetBloomFilterFPRate(double bloomFilterFPRate)
 
- 
- 
- 
Method Detail- 
calculatepublic FilterMerger.Result calculate(com.google.common.collect.ImmutableList<PeerFilterProvider> providers) 
 - 
setBloomFilterFPRatepublic void setBloomFilterFPRate(double bloomFilterFPRate) 
 - 
getBloomFilterFPRatepublic double getBloomFilterFPRate() 
 - 
getLastFilterpublic BloomFilter getLastFilter() 
 
- 
 
-