[
https://issues.apache.org/jira/browse/COLLECTIONS-728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17001053#comment-17001053
]
Gilles Sadowski commented on COLLECTIONS-728:
---------------------------------------------
{quote}When Shapes or BloomFilters that were created with MyHash are serialized
by the application (application responsibility) the HashFunctionIdentity will
be serialized. The application deserializing the HashFunctionIdentity will
either need to have the MyHash class or another implementation of the same
function.
{quote}
Then, the question is: What does the Bloom filter functionality (that
constitutes your code contribution to [Collections]) need beyond a
{{HashFunction}} interface that defines a method {{isCompatible(HashFunction
other)}}?
In effect, my issue is still the same (I think) as several comments ago: How
to ensure that some instance of {{HashFunctionIdentity}} will *really* be
compatible with another (whether within the same JVM or after serialization)?
It seems to me that whatever check is done in a "composed" way with
{{isIterative()}}, {{isUnsigned()}}, {{getName()}}, ... can be achieved in a
simple (and more robust, at the implementor's discretion) way with
{{isCompatible(HashFunction)}}.
Furthermore, in order to call {{isIterative()}}, etc. you obviously need a JVM
at the other end of the serialization/deserialization pipeline.
Now, if distributed processing is an integral feature (?) of using the
{{BloomFilter}} class, perhaps that we must define as
{code:java}
interface HashFunction extends Serializable {
// ...
}
{code}
Note that what Sebb and others pointed out is that o.a. things, "it's difficult
to code Serializable classes properly" but the rest of the quote ("We should
not promise what we likely cannot continue to deliver") does not apply here,
because the burden will be on implementors. And _they_ will choose how robust
and future-proof their handling of {{Serializable}} needs to be (for their
purpose).
However, is it actually true that {{BloomFilter}} usage only makes sense in
distributed applications? If not, I'd be wary of the above definition (since it
will impose an unnecessary burden, or could provide a false sense of security
if {{Serializable}} is not properly implemented).
> BloomFilter contribution
> ------------------------
>
> Key: COLLECTIONS-728
> URL: https://issues.apache.org/jira/browse/COLLECTIONS-728
> Project: Commons Collections
> Issue Type: Task
> Reporter: Claude Warren
> Priority: Minor
> Attachments: BF_Func.md, BloomFilter.java, BloomFilterI2.java,
> Usage.md
>
>
> Contribution of BloomFilter library comprising base implementation and gated
> collections.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)