Code example for ReentrantReadWriteLock

0
	protected final int length;
 
	protected transient ReadWriteLock lock = new ReentrantReadWriteLock();
	 
	public void init(ObjectContainer container) {
		lock = new ReentrantReadWriteLock();
	} 
 
	public static BloomFilter createFilter(int length, int k, boolean counting) {
		if (length == 0)
			return new NullBloomFilter(length, k);
		if (counting)
			return new CountingBloomFilter(length, k);
		else 
			return new BinaryBloomFilter(length, k);
	} 
	 
	public static BloomFilter createFilter(File file, int length, int k, boolean counting) throws IOException {
		if (length == 0)
			return new NullBloomFilter(length, k);
		if (counting)