|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |
Work dispatcher, a ThreadPool-type system. Juggles various multithreaded, multinode method call details.
I can't remember if this class if 100% reliable. I think sometimes it has problems matching up replies with their original requests and what not.
Field Summary | |
---|---|
Naanou.LookupService.Node | node |
System.Collections.Hashtable | outstanding |
System.Random | random |
Fields inherited from class Naanou.Common.WorkPool |
---|
maintainThread, maxWorkerAgeMins, mre, poolMaxSize, poolMRE, queue, threadsInUse, tiuLock |
Constructor Summary | |
---|---|
Dispatch(Naanou.LookupService.Node node) Constructor |
Property Summary | |
---|---|
Naanou.LookupService.Node |
Node
Gets the node reference |
Method Summary | |
---|---|
void |
AddWorkState(Naanou.LookupService.WorkDispatch.WorkState state) Adds extra work state |
string |
GetSerial() Generates an almost unique serial made up of the node's id, current ticks and a random (0-1000) integer. |
string |
GetSerial(Naanou.LookupService.NodeAddress address) Generates an almost unique serial made up an address's id, current ticks and a random (0-1000) integer. |
void |
RemoveWorkState(Naanou.LookupService.WorkDispatch.WorkState state) Removes work state, ignoring instances |
void |
ResultNotification(string serial, object[] results) As results for async remote communications come in, they hit here to be dispatched to original client |
Methods inherited from class Naanou.Common.WorkPool |
---|
Cancel, Queue |
Methods inherited from class System.Object |
---|
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString |
Field Detail |
---|
private Naanou.LookupService.Node node
private System.Collections.Hashtable outstanding
private System.Random random
Constructor Detail |
---|
public Dispatch(Naanou.LookupService.Node node)
Constructor
Parameters:
node
- NodeProperty Detail |
---|
public Naanou.LookupService.Node Node
Gets the node reference
Method Detail |
---|
internal void AddWorkState(Naanou.LookupService.WorkDispatch.WorkState state)
Adds extra work state
Parameters:
state
- State to addinternal string GetSerial()
Generates an almost unique serial made up of the node's id, current ticks and a random (0-1000) integer.
Returns:
public string GetSerial(Naanou.LookupService.NodeAddress address)
Generates an almost unique serial made up an address's id, current ticks and a random (0-1000) integer.
Parameters:
address
- Node addressinternal void RemoveWorkState(Naanou.LookupService.WorkDispatch.WorkState state)
Removes work state, ignoring instances
Parameters:
state
- State to removepublic void ResultNotification(string serial, object[] results)
As results for async remote communications come in, they hit here to be dispatched to original client
Parameters:
serial
- Serial of resultsresults
- Result parameters
|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |