You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Claude Warren (Jira)" <ji...@apache.org> on 2024/04/23 17:48:00 UTC

[jira] [Created] (COLLECTIONS-853) API changes to LayeredBloomFilter, LayerManager and WrappedBloomFilter

Claude Warren created COLLECTIONS-853:
-----------------------------------------

             Summary: API changes to LayeredBloomFilter, LayerManager and WrappedBloomFilter
                 Key: COLLECTIONS-853
                 URL: https://issues.apache.org/jira/browse/COLLECTIONS-853
             Project: Commons Collections
          Issue Type: Improvement
    Affects Versions: 4.5.0-M1
            Reporter: Claude Warren


After looking at the LayeredBloomFilter and the LayerManager and the way it is intended to be used I found a couple of changes that we might want to consider.

1) WrappedBloomFilter should not implement copy(), that should be left to the wrapping implementation.

2) We change LayerManager to be a templated type that contains a List<T extends BloomFilter> and add two methods first() and last() to retrieve the first and last internal filters respectively.  These are common queries and should be directly implemented.

3) We change LayeredBloomFilter to be a templated type <T extends BloomFilter> where T is the type of BloomFilter to be used for each Layer.

For example the use of LayeredBloomFilter for KIP-936 requires a BloomFilter with an associated timestamp.  So when copy() is called for duplication it must create the same BloomFilter.  It uses WrappedBloomFilter to add the timestamp property.  The LayeredBloomFilter in KIP-936 actually stores a custom TimestampedBloomFilter implementation that extends WrappedBloomFilter.

This is a rather deep change to LayeredBloomFilter but I think Alex is correct that we should use List, but that usage dictates that we use T extends BloomFilter as the type.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)