|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |
Node. The big mother of a class.
Field Summary | |
---|---|
Naanou.LookupService.NodeAddress | address |
Naanou.LookupService.RequestForwarder | backForwarder |
Naanou.LookupService.BackwardsFingerTable | backwardsFingerTable |
Naanou.LookupService.WorkDispatch.Dispatch | dispatch |
Naanou.LookupService.FingerTable | fingerTable |
Naanou.Common.Hash | id |
bool |
inNetwork
Node is in a network |
Naanou.LookupService.KeyStorage | keyStorage |
Naanou.Common.ILogger | logger |
Naanou.Common.Hash | networkId |
Naanou.LookupService.Cache | nodeCache |
bool | onCycle |
long | partitionDetectionStart |
Naanou.LookupService.PartitionDetect | partitionDetector |
bool | performedNeighbourSync |
Naanou.LookupService.NodeAddress | predecessorAddress |
System.Random | random |
Naanou.LookupService.RemoteNode | rnode |
bool | seekingBetterPredecessor |
bool | seekingBetterSuccessor |
bool | shuttingDown |
int | stabiliseCount |
System.Threading.Thread | stabiliserThread |
Naanou.LookupService.NodeState | state |
Naanou.LookupService.SuccessorList | successorList |
Naanou.LookupService.Network | transport |
Constructor Summary | |
---|---|
Node(Naanou.Common.ILogger logger) Constructor |
Property Summary | |
---|---|
Naanou.LookupService.NodeAddress |
Address
Gets an Address representation of this node |
Naanou.LookupService.FingerTable |
BackwardsFingers
Gets backwards finger table |
Naanou.LookupService.RequestForwarder |
BackwardsForwarder
Gets the backwards method forwarder |
Naanou.LookupService.WorkDispatch.Dispatch |
Dispatch
Gets work dispatcer |
bool |
FingersReady
Returns true if both finger tables are ready, and dont need filling |
Naanou.LookupService.FingerTable |
ForwardFingers
Gets forward finger table |
Naanou.Common.Hash |
Id
Gets the nodes id (derived from it's Name) |
int |
KeyCount
Gets the number of keys stored |
Naanou.LookupService.KeyStorage |
Keys
Gets key storage used by node |
string | LocalAddress |
Naanou.Common.ILogger |
Logger
Gets or sets the logging component |
Naanou.LookupService.Network |
Network
Gets network |
Naanou.Common.Hash |
NetworkId
Gets the id of the network node is on |
Naanou.LookupService.Cache |
NodeCache
Gets a reference to the Node Cache |
bool |
OnCycle
Is the node in a cycle? |
Naanou.LookupService.NodeAddress |
PredecessorAddress
Gets the immediate predecessor's address |
Naanou.LookupService.RemoteNode |
RemoteNode
Gets the remote node for this node |
bool |
ShuttingDown
Gets whether node is in the process of shutting down |
Naanou.LookupService.NodeState |
State
Gets the node's current state |
Naanou.LookupService.NodeAddress |
SuccessorAddress
Gets the immediate successor's address |
Naanou.LookupService.SuccessorList | SuccessorList |
string |
Url
Gets the remoting Url for this node |
Method Summary | |
---|---|
Naanou.LookupService.NodeAddress |
BackwardsProbe(Naanou.Common.BasicAddress address) Used by RemoteNode.BackwardsProbe for fast strong stabilisation (pg 24, Chord paper) |
void |
ClearKeys() Clears the keys the node stores |
Naanou.Common.BasicAddress |
ClosestPreceedingAddress(Naanou.Common.Hash id, bool quick) Gets the closest preceeding addres of a key. |
Naanou.LookupService.NodeAddress |
ClosestPreceedingNode(Naanou.Common.Hash id, bool quick) Implementation of ClosestPreceedingNode. Attempts to find the closest node to id. Called by RemoteNode instance |
void |
DiscoveryCompleted() Call back that discovery has been completed |
string |
DumpFingerTable() Dumps the finger tables |
string |
DumpKeys() Dumps all keys and values node has stored to a string |
string |
DumpNodeCache() Dumps the node cache into a string |
string |
DumpSuccessorList() Dumps the successor list into a string |
void |
Finalize() Deconstructor |
void |
FindSuccessorNode(Naanou.Common.Hash id, bool randomForward, Naanou.Common.FindSuccessorDelegate callback) Finds the successor node for a key |
void |
FindSuccessorNode(Naanou.Common.Hash id, bool randomForward, Naanou.Common.FindSuccessorResult result, Naanou.Common.FindSuccessorDelegate callback, bool closeOffState) Finds the successor ndoe for a key |
void |
FindSuccessorNodeAsync(Naanou.Common.Hash id, Naanou.Common.BasicAddress nodeToQuery, bool randomForward, Naanou.Common.FindSuccessorResult resultChain, Naanou.Common.FindSuccessorDelegate callback, string requestSerial) Finds the successor for a key (Async) |
void |
FindSuccessorNodeAsync(Naanou.Common.Hash id, Naanou.LookupService.NodeAddress nodeToQuery, bool randomForward, Naanou.Common.FindSuccessorResult resultChain, Naanou.Common.FindSuccessorDelegate callback, string requestSerial) Finds the successor for a key (Async) |
void |
FoundSuccessorNode(Naanou.Common.FindSuccessorResult result, Naanou.Common.BasicAddress nodeQueried) Gets called remotely via Naanou.LookupService.Node.FindSuccessorNodeAsync(Naanou.Common.Hash,Naanou.Common.BasicAddress,System.Boolean,Naanou.Common.FindSuccessorResult,Naanou.Common.FindSuccessorDelegate,System.String) |
Naanou.LookupService.NodeAddress |
GetJoinSuccessor(Naanou.LookupService.NodeAddress bootNode, int hops) Gets a node suitable for being our successor. Returns proxied address |
void |
GetKeyAsync(Naanou.Common.Hash id, Naanou.Common.GotKeyDelegate callback, string requestSerial) Gets a item from a key |
Naanou.Common.KeyContainer[] |
GetKeyImpl(Naanou.Common.Hash id) Gets a data value. Does no range checking |
Naanou.Common.BasicAddress[] | GetSuccessorList() |
void |
GotKey(Naanou.Common.GetKeyResult result) Gets called from RemoteNode else via GetKey |
bool |
IdWithin(Naanou.LookupService.NodeAddress context, Naanou.LookupService.NodeAddress lower, Naanou.LookupService.NodeAddress upper) Checks whether id is above lower and under upper. |
bool |
IdWithin(Naanou.Common.Hash id, Naanou.Common.Hash lower, Naanou.Common.Hash upper) Checks whether id is above lower and under upper. |
void |
Join(Naanou.LookupService.NodeAddress addressToJoin) Join another node in a network |
void |
JoinedNetwork() Does stuff that we need to do when we join a network, or when someone else joins us, forming a network |
void |
Log(string message) Logs a status message |
void |
Log(string message, Naanou.Common.LogLevel level) Logs a message with a log level |
bool | MightHaveKey(Naanou.Common.Hash id) |
void |
NodeDied(Naanou.LookupService.NodeAddress address) General purpose notification point for when a node that we know about has died. Removes from cache, fingers and adjusts successor/predecessor if necessary |
void | OnBackFingerTableFillCompleted(object sender, System.EventArgs args) |
void | OnBackFingerTableFillFailed(object sender, System.EventArgs args) |
void | OnFingerTableFillCompleted(object sender, System.EventArgs args) |
void | OnFingerTableFillFailed(object sender, System.EventArgs args) |
void | OnKeyAdded(object sender, Naanou.LookupService.KeyAddedEventArgs args) |
void | OnKeyRemoved(object sender, Naanou.LookupService.KeyRemovedEventArgs args) |
void | OnKeysCleared(object sender) |
void |
OnNodeCacheAdded(object sender, Naanou.LookupService.NodeEventArgs args) Node has been added to cache. All extra node discoveries after initial discovery will flow through this event |
void | OnPartitionDetectionComplete(object sender, System.EventArgs args) |
void |
OnSuccessorChange(Naanou.LookupService.Node sender, Naanou.LookupService.AddressChangeArgs args) Triggered by the SuccessorList when the active successor has changed |
void |
PartedNetwork() Called when we have left the network (forcibly or out of an error condition) |
void |
PartitionDetect() Runs discovery again to detect partitions |
void |
PutKey(Naanou.Common.KeyContainer key, int hops) Stores a key and associated data value in the distributed hashtable |
void | PutKey(Naanou.Common.KeyContainer key, int hops, bool onlyLocalPut) |
void |
PutKeyImpl(Naanou.Common.KeyContainer key) Stores a key and associated data value. Does no range checking |
int | PutKeyRemote(Naanou.Common.KeyContainer key, Naanou.Common.FindSuccessorResult location) |
void |
QueryAsync(Naanou.Common.Search.SearchQuery query, Naanou.Common.QueryProgressDelegate clientCallback, Naanou.Common.BasicAddress client, string requestSerial) Async querying |
void |
QueryProgress(Naanou.Common.Search.SearchResultSet result, bool completed) Gets called from RemoteNode via QueryProgress |
void |
QuerySync(Naanou.Common.Search.SearchPart part, Naanou.Common.QueryProgressDelegate callback, string clientIdSerial, string requestSerial) Query |
void |
RefreshAddress() Refreshes the address's url and network settings to current instance variable values |
void |
SeekBetterPredecessor() Attempts to seek a better predecessor than what we have now. Replaces current predecessor if it has died, or it is better |
void | SeekBetterPredecessorImpl() |
void |
SeekBetterSuccessor() Attempts to seek a better successor than what we have now. Replaces current if it has died or we find a better one. |
void | SeekBetterSuccessorImpl() |
void |
SetError(string message) Set error condition to be presented to user |
void |
SetError(string message, System.Exception exception) Set node error condition, which is presented to user |
void | SetOnCycle(bool cycle) |
void |
SetPredecessor(Naanou.LookupService.NodeAddress address) Sets the predecessor and fires Naanou.LookupService.Node.PredecessorChange event. Gets called from RemoteNode after a NotifyPredecessor call by a remote note too. |
void |
SetState(Naanou.LookupService.NodeState state) Changes the node state and fires Naanou.LookupService.Node.StateChange event. |
void |
SetSuccessor(Naanou.LookupService.NodeAddress address) Sets the successor, and fires the Naanou.LookupService.Node.SuccessorChange event Gets called from RemoteNode after a NotifySuccessor call by a remote node too. |
void |
SetSuccessor(int rank, Naanou.LookupService.NodeAddress address) Sets the successor at a particular rank. Old element at its spot will be shuffled up |
void |
StabiliseLoop() Runs in Stabilise thread. Runs Naanou.LookupService.Node.WeakStabilise according to Naanou.LookupService.Config.WeakStabiliseFrequency. Runs Naanou.LookupService.Node.StrongFastStabilise once for every Naanou.LookupService.Config.StrongStabiliseRatio weak stabilises. Also does a key storage GC for each strong stabilise |
void | StabiliseLoopImpl() |
void |
Start() Starts communication services for node (transport, then discovery) |
void |
StartStabiliser() Starts stabilisationg |
void |
Stop() Shuts down a node. Stops stabiliser thread, notifies current pred and succ, transfers keys and stops transport |
void |
StrongFastStabilise() Strong stabilise (pg 24, Chord paper) |
void |
StrongSlowStabilise() Strong stabilise (Figure 9, pg 21 Chord paper) |
void |
UpdateBackwardFingers() Updates backward fingers. CAlled from JoinedNetwork in a different thread |
void |
UpdateForwardFingers() Updates forward fingers. Called from JoinedNetwork in a different thread |
void | UserWarningMessage(string message) |
void |
WeakStabilise() Weak stabilise. Verifies successor, and ensures they know about us |
void | WeakStabiliseSuccessor() |
Methods inherited from class System.Object |
---|
Equals, GetHashCode, GetType, MemberwiseClone, ToString |
Event Summary | |
---|---|
Naanou.LookupService.NodeErrorStateHandler |
ErrorState
Error state |
Naanou.LookupService.PredecessorChangeHandler |
PredecessorChange
Predecessor has changed |
System.EventHandler |
StateChange
State has changed |
Naanou.LookupService.SuccessorChangeHandler |
SuccessorChange
Successor has changed |
Naanou.LookupService.UserWarningHandler | UserWarning |
Field Detail |
---|
private Naanou.LookupService.NodeAddress address
private Naanou.LookupService.RequestForwarder backForwarder
private Naanou.LookupService.BackwardsFingerTable backwardsFingerTable
private Naanou.LookupService.WorkDispatch.Dispatch dispatch
private Naanou.LookupService.FingerTable fingerTable
private Naanou.Common.Hash id
private bool inNetwork
Node is in a network
private Naanou.LookupService.KeyStorage keyStorage
private Naanou.Common.ILogger logger
private Naanou.Common.Hash networkId
private Naanou.LookupService.Cache nodeCache
private bool onCycle
private long partitionDetectionStart
private Naanou.LookupService.PartitionDetect partitionDetector
private bool performedNeighbourSync
private Naanou.LookupService.NodeAddress predecessorAddress
private System.Random random
private Naanou.LookupService.RemoteNode rnode
private bool seekingBetterPredecessor
private bool seekingBetterSuccessor
private bool shuttingDown
private int stabiliseCount
private System.Threading.Thread stabiliserThread
private Naanou.LookupService.NodeState state
private Naanou.LookupService.SuccessorList successorList
private Naanou.LookupService.Network transport
Constructor Detail |
---|
public Node(Naanou.Common.ILogger logger)
Constructor
Parameters:
name
- Name for nodelogger
- Logger to useProperty Detail |
---|
public Naanou.LookupService.NodeAddress Address
Gets an Address representation of this node
public Naanou.LookupService.FingerTable BackwardsFingers
Gets backwards finger table
public Naanou.LookupService.RequestForwarder BackwardsForwarder
Gets the backwards method forwarder
public Naanou.LookupService.WorkDispatch.Dispatch Dispatch
Gets work dispatcer
public bool FingersReady
Returns true if both finger tables are ready, and dont need filling
public Naanou.LookupService.FingerTable ForwardFingers
Gets forward finger table
public Naanou.Common.Hash Id
Gets the nodes id (derived from it's Name)
public int KeyCount
Gets the number of keys stored
public Naanou.LookupService.KeyStorage Keys
Gets key storage used by node
public string LocalAddress
public Naanou.Common.ILogger Logger
Gets or sets the logging component
public Naanou.LookupService.Network Network
Gets network
public Naanou.Common.Hash NetworkId
Gets the id of the network node is on
public Naanou.LookupService.Cache NodeCache
Gets a reference to the Node Cache
internal bool OnCycle
Is the node in a cycle?
public Naanou.LookupService.NodeAddress PredecessorAddress
Gets the immediate predecessor's address
internal Naanou.LookupService.RemoteNode RemoteNode
Gets the remote node for this node
public bool ShuttingDown
Gets whether node is in the process of shutting down
public Naanou.LookupService.NodeState State
Gets the node's current state
public Naanou.LookupService.NodeAddress SuccessorAddress
Gets the immediate successor's address
internal Naanou.LookupService.SuccessorList SuccessorList
public string Url
Gets the remoting Url for this node
Method Detail |
---|
public Naanou.LookupService.NodeAddress BackwardsProbe(Naanou.Common.BasicAddress address)
Used by RemoteNode.BackwardsProbe for fast strong stabilisation (pg 24, Chord paper)
Returns:
public void ClearKeys()
Clears the keys the node stores
private Naanou.Common.BasicAddress ClosestPreceedingAddress(Naanou.Common.Hash id, bool quick)
Gets the closest preceeding addres of a key.
Parameters:
id
- Keyquick
- Quick searchinternal Naanou.LookupService.NodeAddress ClosestPreceedingNode(Naanou.Common.Hash id, bool quick)
Implementation of ClosestPreceedingNode. Attempts to find the closest node to id. Called by RemoteNode instance
Parameters:
id
- Id to lookupquick
- Attempt to look up quickly, at the expense of accuracyinternal void DiscoveryCompleted()
Call back that discovery has been completed
public string DumpFingerTable()
Dumps the finger tables
Returns:
public string DumpKeys()
Dumps all keys and values node has stored to a string
Returns:
public string DumpNodeCache()
Dumps the node cache into a string
Returns:
public string DumpSuccessorList()
Dumps the successor list into a string
Returns:
protected void Finalize()
Deconstructor
internal void FindSuccessorNode(Naanou.Common.Hash id, bool randomForward, Naanou.Common.FindSuccessorDelegate callback)
Finds the successor node for a key
Parameters:
id
- Big Integer serial for keycallback
- Callback for resultinternal void FindSuccessorNode(Naanou.Common.Hash id, bool randomForward, Naanou.Common.FindSuccessorResult result, Naanou.Common.FindSuccessorDelegate callback, bool closeOffState)
Finds the successor ndoe for a key
Parameters:
id
- Keyresult
- Existing result chaincallback
- Callback for resultpublic void FindSuccessorNodeAsync(Naanou.Common.Hash id, Naanou.Common.BasicAddress nodeToQuery, bool randomForward, Naanou.Common.FindSuccessorResult resultChain, Naanou.Common.FindSuccessorDelegate callback, string requestSerial)
Finds the successor for a key (Async)
Parameters:
id
- IdnodeToQuery
- Node to queryresultChain
- Result chaincallback
- Callback for resultpublic void FindSuccessorNodeAsync(Naanou.Common.Hash id, Naanou.LookupService.NodeAddress nodeToQuery, bool randomForward, Naanou.Common.FindSuccessorResult resultChain, Naanou.Common.FindSuccessorDelegate callback, string requestSerial)
Finds the successor for a key (Async)
Parameters:
id
- IdnodeToQuery
- Node to queryresultChain
- Result chaincallback
- Callback for resultpublic void FoundSuccessorNode(Naanou.Common.FindSuccessorResult result, Naanou.Common.BasicAddress nodeQueried)
Gets called remotely via Naanou.LookupService.Node.FindSuccessorNodeAsync(Naanou.Common.Hash,Naanou.Common.BasicAddress,System.Boolean,Naanou.Common.FindSuccessorResult,Naanou.Common.FindSuccessorDelegate,System.String)
Parameters:
result
- ResultnodeQueried
- Node queried for successorprivate Naanou.LookupService.NodeAddress GetJoinSuccessor(Naanou.LookupService.NodeAddress bootNode, int hops)
Gets a node suitable for being our successor. Returns proxied address
Returns:
public void GetKeyAsync(Naanou.Common.Hash id, Naanou.Common.GotKeyDelegate callback, string requestSerial)
Gets a item from a key
Parameters:
id
- Keycallback
- Callback when there is a resultSystem.ArgumentException
- Key cannot be retrievedNaanou.LookupService.InvalidNodeState
- Node is in an invalid stateinternal Naanou.Common.KeyContainer[] GetKeyImpl(Naanou.Common.Hash id)
Gets a data value. Does no range checking
Parameters:
id
- KeyNaanou.LookupService.InvalidNodeState
- Node is in an invalid stateinternal Naanou.Common.BasicAddress[] GetSuccessorList()
public void GotKey(Naanou.Common.GetKeyResult result)
Gets called from RemoteNode else via GetKey
Parameters:
result
- Resultpublic bool IdWithin(Naanou.LookupService.NodeAddress context, Naanou.LookupService.NodeAddress lower, Naanou.LookupService.NodeAddress upper)
Checks whether id is above lower and under upper.
Parameters:
context
- Contextlower
- Lower boundupper
- Upper boundpublic bool IdWithin(Naanou.Common.Hash id, Naanou.Common.Hash lower, Naanou.Common.Hash upper)
Checks whether id is above lower and under upper.
Parameters:
id
- Id to checklower
- Lower boundupper
- Upper boundinternal void Join(Naanou.LookupService.NodeAddress addressToJoin)
Join another node in a network
Parameters:
addressToJoin
- Boot nodeNaanou.LookupService.NodeCommunicationException
- Thrown when addressToJoin could not be contactedprivate void JoinedNetwork()
Does stuff that we need to do when we join a network, or when someone else joins us, forming a network
public void Log(string message)
Logs a status message
Parameters:
message
- public void Log(string message, Naanou.Common.LogLevel level)
Logs a message with a log level
Parameters:
message
- level
- internal bool MightHaveKey(Naanou.Common.Hash id)
internal void NodeDied(Naanou.LookupService.NodeAddress address)
General purpose notification point for when a node that we know about has died. Removes from cache, fingers and adjusts successor/predecessor if necessary
Parameters:
address
- private void OnBackFingerTableFillCompleted(object sender, System.EventArgs args)
private void OnBackFingerTableFillFailed(object sender, System.EventArgs args)
private void OnFingerTableFillCompleted(object sender, System.EventArgs args)
private void OnFingerTableFillFailed(object sender, System.EventArgs args)
private void OnKeyAdded(object sender, Naanou.LookupService.KeyAddedEventArgs args)
private void OnKeyRemoved(object sender, Naanou.LookupService.KeyRemovedEventArgs args)
private void OnKeysCleared(object sender)
private void OnNodeCacheAdded(object sender, Naanou.LookupService.NodeEventArgs args)
Node has been added to cache. All extra node discoveries after initial discovery will flow through this event
Parameters:
sender
- args
- private void OnPartitionDetectionComplete(object sender, System.EventArgs args)
private void OnSuccessorChange(Naanou.LookupService.Node sender, Naanou.LookupService.AddressChangeArgs args)
Triggered by the SuccessorList when the active successor has changed
Successor will changed when forced, or when our immediate successor dies
Parameters:sender
- args
- private void PartedNetwork()
Called when we have left the network (forcibly or out of an error condition)
private void PartitionDetect()
Runs discovery again to detect partitions
public void PutKey(Naanou.Common.KeyContainer key, int hops)
Stores a key and associated data value in the distributed hashtable
Parameters:
key
- Key to storehops
- Hop countSystem.ArgumentException
- Key cannot be storedNaanou.LookupService.InvalidNodeState
- Node is in an invalid statepublic void PutKey(Naanou.Common.KeyContainer key, int hops, bool onlyLocalPut)
internal void PutKeyImpl(Naanou.Common.KeyContainer key)
Stores a key and associated data value. Does no range checking
Parameters:
key
- KeyNaanou.LookupService.InvalidNodeState
- Node is in an invalid stateprivate int PutKeyRemote(Naanou.Common.KeyContainer key, Naanou.Common.FindSuccessorResult location)
public void QueryAsync(Naanou.Common.Search.SearchQuery query, Naanou.Common.QueryProgressDelegate clientCallback, Naanou.Common.BasicAddress client, string requestSerial)
Async querying
Parameters:
query
- Query to makeclientCallback
- Callback to use for progress reportageclient
- Clientpublic void QueryProgress(Naanou.Common.Search.SearchResultSet result, bool completed)
Gets called from RemoteNode via QueryProgress
Parameters:
result
- Resultcompleted
- Is this the last result from this sourceinternal void QuerySync(Naanou.Common.Search.SearchPart part, Naanou.Common.QueryProgressDelegate callback, string clientIdSerial, string requestSerial)
Query
Parameters:
part
- Query partclientIdSerial
- Clientcallback
- Callback for result reportagepublic void RefreshAddress()
Refreshes the address's url and network settings to current instance variable values
private void SeekBetterPredecessor()
Attempts to seek a better predecessor than what we have now. Replaces current predecessor if it has died, or it is better
private void SeekBetterPredecessorImpl()
private void SeekBetterSuccessor()
Attempts to seek a better successor than what we have now. Replaces current if it has died or we find a better one.
private void SeekBetterSuccessorImpl()
public void SetError(string message)
Set error condition to be presented to user
Parameters:
message
- public void SetError(string message, System.Exception exception)
Set node error condition, which is presented to user
Parameters:
message
- Errorexception
- Exception to wrapprivate void SetOnCycle(bool cycle)
internal void SetPredecessor(Naanou.LookupService.NodeAddress address)
Sets the predecessor and fires Naanou.LookupService.Node.PredecessorChange event. Gets called from RemoteNode after a NotifyPredecessor call by a remote note too.
Parameters:
address
- New predecessorSystem.ArgumentException
- Thrown if predecessor is higher than node's idinternal void SetState(Naanou.LookupService.NodeState state)
Changes the node state and fires Naanou.LookupService.Node.StateChange event.
Parameters:
state
- internal void SetSuccessor(Naanou.LookupService.NodeAddress address)
Sets the successor, and fires the Naanou.LookupService.Node.SuccessorChange event Gets called from RemoteNode after a NotifySuccessor call by a remote node too.
Parameters:
address
- New successorSystem.ArgumentException
- Thrown if successor is not higher than node's idinternal void SetSuccessor(int rank, Naanou.LookupService.NodeAddress address)
Sets the successor at a particular rank. Old element at its spot will be shuffled up
Parameters:
rank
- address
- private void StabiliseLoop()
Runs in Stabilise thread. Runs Naanou.LookupService.Node.WeakStabilise according to Naanou.LookupService.Config.WeakStabiliseFrequency. Runs Naanou.LookupService.Node.StrongFastStabilise once for every Naanou.LookupService.Config.StrongStabiliseRatio weak stabilises. Also does a key storage GC for each strong stabilise
private void StabiliseLoopImpl()
public void Start()
Starts communication services for node (transport, then discovery)
Returns:
private void StartStabiliser()
Starts stabilisationg
public void Stop()
Shuts down a node. Stops stabiliser thread, notifies current pred and succ, transfers keys and stops transport
private void StrongFastStabilise()
Strong stabilise (pg 24, Chord paper)
private void StrongSlowStabilise()
Strong stabilise (Figure 9, pg 21 Chord paper)
private void UpdateBackwardFingers()
Updates backward fingers. CAlled from JoinedNetwork in a different thread
private void UpdateForwardFingers()
Updates forward fingers. Called from JoinedNetwork in a different thread
internal void UserWarningMessage(string message)
internal void WeakStabilise()
Weak stabilise. Verifies successor, and ensures they know about us
private void WeakStabiliseSuccessor()
Event Detail |
---|
public Naanou.LookupService.NodeErrorStateHandler ErrorState
Error state
public Naanou.LookupService.PredecessorChangeHandler PredecessorChange
Predecessor has changed
public System.EventHandler StateChange
State has changed
public Naanou.LookupService.SuccessorChangeHandler SuccessorChange
Successor has changed
public Naanou.LookupService.UserWarningHandler UserWarning
|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |