Method | Description | |
---|---|---|
Blocker ( |
Returns what contact is blocking insertion (least promoted), or null if no contact is.
|
|
BucketList ( |
Make a new bucket list, for holding node contacts.
|
|
CloseContacts ( |
Return a list of the BUCKET_SIZE contacts with IDs closest to target, not containing any contacts with the excluded ID.
|
|
CloseContacts ( int count, |
Returns a list of the specified number of contacts with IDs closest to the given key, excluding the excluded ID.
|
|
Contains ( |
See if we have a contact with the given ID.
|
|
Get ( |
Return the contact with the given ID, or null if it's not found.
|
|
GetCount ( ) : int |
Return how many contacts are cached.
|
|
IDsForRefresh ( System.TimeSpan tooOld ) : IList |
Gets a list of IDs that fall in buckets that haven't been written to in tooOld.
|
|
NodesToKey ( |
Return the number of nodes in the network closer to the key than us. This is a guess as described at http://xlattice.sourceforge.net/components/protocol/kademlia/specs.html
|
|
Promote ( |
Move the contact with the given ID to the front of its bucket.
|
|
Put ( |
Add the given contact at the end of its bucket.
|
|
Remove ( |
Remove a contact.
|
|
ToString ( ) : string |
A ToString for debugging.
|
|
Touch ( |
Report that a lookup was done for the given key. Key must not match our ID.
|
Method | Description | |
---|---|---|
BucketFor ( |
Returns what bucket an ID maps to. PRECONDITION: ourID not passed.
|
|
ForBucket ( int bucket ) : |
Return an ID that belongs in the given bucket.
|
public Blocker ( |
||
toAdd | The node to add | |
return |
public BucketList ( |
||
ourID | The ID to center the list on. | |
return | System |
public CloseContacts ( |
||
target | The target to find the close node to | |
excluded | The excluded ID | |
return | List |
public CloseContacts ( int count, |
||
count | int | The number of contacts to found |
target | The target node | |
excluded | The excluded node | |
return | List |
public Contains ( |
||
toCheck | The ID to find into the structure | |
return | bool |
public Get ( |
||
toGet | The ID of the contact to Get | |
return |
public IDsForRefresh ( System.TimeSpan tooOld ) : IList |
||
tooOld | System.TimeSpan | The timespan to discriminate |
return | IList |
public Promote ( |
||
toPromote | The identificator of the contact to promote | |
return | void |
public Put ( |
||
toAdd | The new contact to add | |
return | void |
public Remove ( |
||
toRemove | The identificator od the contact to remove | |
return | void |
public Touch ( |
||
key | The bucket that refer the bucket to touch | |
return | void |