public class NIDa extends Object
Modifier and Type | Field and Description |
---|---|
(package private) long |
lfsr1 |
(package private) long |
lfsr2 |
(package private) NodeID |
nid |
(package private) int |
nida |
Modifier and Type | Method and Description |
---|---|
protected int |
computeAliasFromGenerator()
Reduce the current generator value to an alias value.
|
protected void |
forceAliasValue(int alias)
For use in testing subclasses only,
this forces the current alias to a specific
value.
|
protected void |
forceSeedValue(long seed1,
long seed2)
For use in testing subclasses only,
this forces the current seed to a specific
value.
|
int |
getNIDa() |
protected void |
loadSeed(NodeID nid)
Algorithm to produce seed from the six bytes
of a node ID.
|
void |
nextAlias()
Update to the next alias in the series
|
protected void |
stepGenerator()
Advance the sequence generator by one step.
|
NodeID nid
int nida
long lfsr1
long lfsr2
public NIDa(NodeID nid)
public int getNIDa()
public void nextAlias()
protected void forceSeedValue(long seed1, long seed2)
protected void forceAliasValue(int alias)
protected void loadSeed(NodeID nid)
Generally, it's easiest to work with the bytes of the ID. The MSB is id[0].
protected void stepGenerator()
protected int computeAliasFromGenerator()
Information on copyright, trademarks and licenses is linked here.
Site hosted by: