I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 7967653d authored by zzz's avatar zzz
Browse files

* DataStructures:

      - 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
parent ad060c5d
No related branches found
No related tags found
No related merge requests found
Showing
with 578 additions and 794 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment