Code example for BloomFilter

Methods: mightContain

0
		Preconditions.checkArgument(key != null && key.length > 0, "Key is empty");
		Preconditions.checkArgument(this.getAppendedSize() >= 1, "the map table is empty");
		GetResult result = new GetResult();
 
		// leverage bloom filter for guarded condition 
		if (!this.bloomFilter.mightContain(key)) return result;
 
		IMapEntry mapEntry = this.binarySearch(key);
		if (mapEntry == null) return result;
		else { 
			if (mapEntry.isCompressed()) {
				result.setValue(Snappy.uncompress(mapEntry.getValue()));
			} else { 
				result.setValue(mapEntry.getValue());
			} 
			if (mapEntry.isDeleted()) {
				result.setDeleted(true);
				return result;
			} 
			if (mapEntry.isExpired()) {