Lucifers,
In order to flesh out the public Clownfish API, Marvin suggested to start with
the Hash class. I think this is a good idea because we already agreed to make
some changes to this class.
The first one is CLOWNFISH-2 "Create iterator for Hash":
https://issues.apache.org/jira/browse/CLOWNFISH-2
Tim has implemented Hash iterators already. We only have to switch to the new
iterators in the Clownfish and Lucy codebase and remove the old iteration methods.
Then there's CLOWNFISH-7 "String-only keys for Hash":
https://issues.apache.org/jira/browse/CLOWNFISH-7
Discussion:
http://mail-archives.apache.org/mod_mbox/lucy-dev/201409.mbox/%3CCAAS6=7i0BiZwnjmjWH93DfsFi-8VWVR0zmdDfv=gdt_hmsn...@mail.gmail.com%3E
Does anyone want to work on one of these tasks?
This should leave us with the following uncontroversial methods to be made
public:
- Clear
- Store
- Fetch
- Delete
- Keys
- Values
- Get_Size
- Equals
Some other notes from my side:
If we only support string keys, should Obj#Hash_Sum be removed? If not, hash
sums should be of type size_t.
What's the Find_Key method for? I think it can be removed.
Using unsigned 32-bit values for hash size and capacity is OK in my opinion.
But HashIter uses int32_t for ticks. It should either use uint32_t or check
for overflow.
Nick