Package net.i2p.data
Class RoutingKeyGenerator
- java.lang.Object
-
- net.i2p.data.RoutingKeyGenerator
-
- Direct Known Subclasses:
RouterKeyGenerator
public abstract class RoutingKeyGenerator extends Object
Component to manage the munging of hashes into routing keys - given a hash, perform some consistent transformation against it and return the result. This transformation is fed by the current "mod data". As of 0.9.16, this is essentially just an interface. Implementation moved to net.i2p.data.router.RouterKeyGenerator. No generator is available in I2PAppContext; you must be in RouterContext.
-
-
Constructor Summary
Constructors Constructor Description RoutingKeyGenerator()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static RoutingKeyGenerator
getInstance()
Get the generator for this context.abstract long
getLastChanged()
The version of the current (today's) mod data.abstract Hash
getRoutingKey(Hash origKey)
Get the routing key for a key.
-
-
-
Method Detail
-
getInstance
public static RoutingKeyGenerator getInstance()
Get the generator for this context.- Returns:
- null in I2PAppContext; non-null in RouterContext.
-
getLastChanged
public abstract long getLastChanged()
The version of the current (today's) mod data. Use to determine if the routing key should be regenerated.
-
getRoutingKey
public abstract Hash getRoutingKey(Hash origKey)
Get the routing key for a key.- Throws:
IllegalArgumentException
- if origKey is null
-
-