|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |
Finger table
Field Summary | |
---|---|
double |
d
Finger distance. As per pg42 of Chord docs |
Naanou.Common.Hash[] |
entries
Entries on finger table - i.e. finger locations. These remain static throughout entire instance of application |
int |
entriesSize
How many entries (fingers) |
int |
FINGER_FILL_TIMEOUT
Number of seconds to wait for a finger filler before giving up |
double |
fingerPowers
Computed finger distance. As per pg42 of Chord docs. |
long |
fingerRequestStart
Time (ticks) finger update was requested, or less than or equal to 0 if there are no outstanding requests |
bool |
forward
Is the finger table forward looking? |
string |
logName
Name to use for class in logging |
Naanou.LookupService.Node |
node
Local node |
Naanou.Common.Hash |
nodeId
Local node id |
System.Collections.Hashtable |
nodes
Nodes. Nodes are stored in hashtable by ids that match ones found in Naanou.LookupService.FingerTable.entries. |
Naanou.Common.BasicAddress |
requestedFingersFrom
Where fingers were requested from |
int | TABLE_SIZE |
Constructor Summary | |
---|---|
FingerTable(Naanou.LookupService.Node node) Constructor |
Property Summary | |
---|---|
Naanou.LookupService.NodeAddress[] |
Addresses
Gets all addresses contained by table |
int |
Count
Gets the number of nodes fingered |
bool | FingerRequestExpired |
bool |
IsForward
Is the table forward looking? |
Naanou.LookupService.Node |
Node
Gets the node associated with this table |
string |
Stats
Gets short stats about table (util, count, entries size) |
double |
Util
Gets utilisation of finger table |
Method Summary | |
---|---|
void |
AddressNotify(Naanou.LookupService.NodeAddress address) Called when Node knows about a new address. Try to put it into finger table somewhere |
void |
BuildTable() Builds the finger table |
void |
ChangeKey(Naanou.Common.Hash fingerLocation, Naanou.LookupService.NodeAddress newAddress, Naanou.LookupService.NodeAddress oldAddress) Changes a hash key |
void |
Clear() Clear finger entries, but maintains finger locations |
string |
Dump() Dumps out the fingers and their values |
Naanou.LookupService.NodeAddress |
FindClosest(Naanou.Common.Hash id) Finds the closest node to id (Above internal node's id and below id). Only returns alive addresses. |
int |
GetClosestEntriesIndex(Naanou.Common.Hash id) Gets the closest index on the entries array to id=. Will fuzzy match the closest LOWER index if no exact can be found |
Naanou.LookupService.NodeAddress |
GetKey(Naanou.Common.Hash key) Gets a node at a particular key |
Naanou.LookupService.NodeAddress |
GetReplacement(Naanou.Common.Hash id) Gets the node nearest to id, but not the node with that id |
bool |
NeedsFilling() Gets whether table needs filling |
void |
NotifyFingers(Naanou.Common.BasicAddress[] addresses, Naanou.Common.BasicAddress source) Notification passed in via Naanou.LookupService.FingerTable.Node from a remote object setting finger values |
void |
OnNodeAddedToCache(object sender, Naanou.LookupService.NodeEventArgs e) Triggered when the cache knows about a new node |
void |
OnNodeRemovedFromCache(object sender, Naanou.LookupService.NodeEventArgs e) Called when a node has been forcibly removed from cache - ie: died/shutdown. Need to update fingers |
void |
RemoveNode(Naanou.LookupService.NodeAddress address) Remove an address from finger table, and rearrange existing |
void |
Reset(Naanou.LookupService.Node node) Resets finger table, triggering a rebuild of fingers |
string |
ToString() Returns a string representation of the object |
void |
UpdateFingers(Naanou.LookupService.NodeAddress existingNode) Updates fingers by interrogating an existing node |
Methods inherited from class System.Object |
---|
Equals, Finalize, GetHashCode, GetType, MemberwiseClone |
Event Summary | |
---|---|
System.EventHandler |
FingerFillFailed
Finger fill has failed |
Naanou.LookupService.FingerKeyChangeHandler |
FingerKeyChange
Triggered when a finger has changed |
Field Detail |
---|
protected double d
Finger distance. As per pg42 of Chord docs
protected Naanou.Common.Hash[] entries
Entries on finger table - i.e. finger locations. These remain static throughout entire instance of application
protected int entriesSize
How many entries (fingers)
private int FINGER_FILL_TIMEOUT
Number of seconds to wait for a finger filler before giving up
protected double fingerPowers
Computed finger distance. As per pg42 of Chord docs.
protected long fingerRequestStart
Time (ticks) finger update was requested, or less than or equal to 0 if there are no outstanding requests
protected bool forward
Is the finger table forward looking?
protected string logName
Name to use for class in logging
protected Naanou.LookupService.Node node
Local node
protected Naanou.Common.Hash nodeId
Local node id
protected System.Collections.Hashtable nodes
Nodes. Nodes are stored in hashtable by ids that match ones found in Naanou.LookupService.FingerTable.entries.
protected Naanou.Common.BasicAddress requestedFingersFrom
Where fingers were requested from
public int TABLE_SIZE
Constructor Detail |
---|
internal FingerTable(Naanou.LookupService.Node node)
Constructor
Parameters:
node
- NodeProperty Detail |
---|
public Naanou.LookupService.NodeAddress[] Addresses
Gets all addresses contained by table
public int Count
Gets the number of nodes fingered
private bool FingerRequestExpired
public bool IsForward
Is the table forward looking?
public Naanou.LookupService.Node Node
Gets the node associated with this table
public string Stats
Gets short stats about table (util, count, entries size)
public double Util
Gets utilisation of finger table
Method Detail |
---|
public void AddressNotify(Naanou.LookupService.NodeAddress address)
Called when Node knows about a new address. Try to put it into finger table somewhere
Parameters:
address
- New nodeprotected void BuildTable()
Builds the finger table
protected void ChangeKey(Naanou.Common.Hash fingerLocation, Naanou.LookupService.NodeAddress newAddress, Naanou.LookupService.NodeAddress oldAddress)
Changes a hash key
Parameters:
fingerLocation
- KeynewAddress
- New addressoldAddress
- Old address (optional)public void Clear()
Clear finger entries, but maintains finger locations
public string Dump()
Dumps out the fingers and their values
Returns:
public Naanou.LookupService.NodeAddress FindClosest(Naanou.Common.Hash id)
Finds the closest node to id (Above internal node's id and below id). Only returns alive addresses.
Parameters:
id
- Idprotected int GetClosestEntriesIndex(Naanou.Common.Hash id)
Gets the closest index on the entries array to id=. Will fuzzy match the closest LOWER index if no exact can be found
Parameters:
id
- Idprivate Naanou.LookupService.NodeAddress GetKey(Naanou.Common.Hash key)
Gets a node at a particular key
Parameters:
key
- Keypublic Naanou.LookupService.NodeAddress GetReplacement(Naanou.Common.Hash id)
Gets the node nearest to id, but not the node with that id
Parameters:
id
- Idinternal bool NeedsFilling()
Gets whether table needs filling
Returns:
public void NotifyFingers(Naanou.Common.BasicAddress[] addresses, Naanou.Common.BasicAddress source)
Notification passed in via Naanou.LookupService.FingerTable.Node from a remote object setting finger values
Parameters:
addresses
- Valuessource
- Source of requestprivate void OnNodeAddedToCache(object sender, Naanou.LookupService.NodeEventArgs e)
Triggered when the cache knows about a new node
Parameters:
sender
- e
- private void OnNodeRemovedFromCache(object sender, Naanou.LookupService.NodeEventArgs e)
Called when a node has been forcibly removed from cache - ie: died/shutdown. Need to update fingers
Parameters:
sender
- e
- protected void RemoveNode(Naanou.LookupService.NodeAddress address)
Remove an address from finger table, and rearrange existing
Parameters:
address
- Remotes a nodepublic void Reset(Naanou.LookupService.Node node)
Resets finger table, triggering a rebuild of fingers
Parameters:
node
- Nodepublic string ToString()
Returns a string representation of the object
Returns:
internal void UpdateFingers(Naanou.LookupService.NodeAddress existingNode)
Updates fingers by interrogating an existing node
Parameters:
existingNode
- Event Detail |
---|
public System.EventHandler FingerFillFailed
Finger fill has failed
public Naanou.LookupService.FingerKeyChangeHandler FingerKeyChange
Triggered when a finger has changed
|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |