class BloomUriUniqFilter extends SetBasedUriUniqFilter
implements Serializable, InitializingBean {
	private static final long serialVersionUID = 1061526253773091309L;

	private static Logger LOGGER =
        Logger.getLogger(BloomUriUniqFilter.class.getName());

	protected BloomFilter bloom; // package access for testing convenience
    public BloomFilter getBloomFilter() {
        return bloom; 
    }
    public void setBloomFilter(BloomFilter filter) {
        bloom = filter; 
    }

    /**
     * Default constructor
     */
    public BloomUriUniqFilter() {
        super();
    }

    /**
     * Initializer.
     */
    public void afterPropertiesSet() {<FILL_FUNCTION_BODY>}

    public void forget(String canonical, CrawlURI item) {
        // TODO? could use in-memory exception list of currently-forgotten items
        LOGGER.severe("forget(\""+canonical+"\",CrawlURI) not supported");
    }

    protected boolean setAdd(CharSequence uri) {
        boolean added = bloom.add(uri);
        // warn if bloom has reached its expected size (and its false-pos
        // rate will now exceed the theoretical/designed level)
        if( added && (count() == bloom.getExpectedInserts())) {
            LOGGER.warning(
                "Bloom has reached expected limit "+bloom.getExpectedInserts()+
                "; false-positive rate will now rise above goal of "+
                "1-in-(2^"+bloom.getHashCount());
        }
        return added;
    }

    protected long setCount() {
        return bloom.size();
    }

    protected boolean setRemove(CharSequence uri) {
        throw new UnsupportedOperationException();
    }
}

        if(bloom==null) {
            // configure default bloom filter if operator hasn't already

            // these defaults create a bloom filter that is
            // 1.44*125mil*22/8 ~= 495MB in size, and at full
            // capacity will give a false contained indication
            // 1/(2^22) ~= 1 in every 4 million probes
            bloom = new BloomFilter64bit(125000000,22);
        }
    
<methods>public void <init>() ,public void add(java.lang.String, org.archive.modules.CrawlURI) ,public void addForce(java.lang.String, org.archive.modules.CrawlURI) ,public void addNow(java.lang.String, org.archive.modules.CrawlURI) ,public long addedCount() ,public void close() ,public long count() ,public void forget(java.lang.String, org.archive.modules.CrawlURI) ,public void note(java.lang.String) ,public long pending() ,public long requestFlush() ,public void setDestination(org.archive.crawler.datamodel.UriUniqFilter.CrawlUriReceiver) ,public void setProfileLog(java.io.File) <variables>private static java.util.logging.Logger LOGGER,protected java.util.concurrent.atomic.AtomicLong addedCount,protected long duplicateCount,protected long duplicatesAtLastSample,protected java.io.PrintWriter profileLog,protected org.archive.crawler.datamodel.UriUniqFilter.CrawlUriReceiver receiver