- Shim in 3 new abstract classes
SimpleDataStructure, KeysAndCert, and DatabaseEntry
===========
Right now, everything in net.i2p.data extends DataStructureImpl.
There are several goals for adding some intermediate abstract classes,
between DataStructureImpl and the concrete classes:
1) Merge common code
2) Make the simple cases (a single byte array) more efficient
by adding a common base class.
I'm calling this one SimpleDataStructure.
3) Make a common base class for Destination and RouterIdentity
since they are almost exactly the same thing.
Consolidate the getters/setters and hash functions here.
I'm calling this one KeysAndCert.
4) Make a common base class for LeaseSet and RouterInfo so
so netDb and I2NP can handle them easier, without doing
"instanceof" all over the place.
Consolidate the hash, signature, and routing key functions here.
I'm calling this one DatabaseEntry.
5) Make it easier to add more object caching.
The additional classes are retrofit
above many of the data types:
DataStructureImpl (unchanged)
-------------------
ByteArray
Certificate
Lease
Payload
RouterAddress
TunnelId
SimpleDataStructure (new)
-------------------------
Hash
PrivateKey
PublicKey
SessionKey
SessionTag (was ByteArray)
Signature
SigningPrivateKey
SigningPublicKey
KeysAndCert (new)
-----------------
Destination
RouterIdentity
DatabaseEntry (new)
-------------------
LeaseSet
RouterInfo