org.xlattice.protocol.xlkad
Class KBucket

java.lang.Object
  extended by org.xlattice.protocol.xlkad.KBucket

public class KBucket
extends java.lang.Object

A KBucket is a queue of up to K contacts. When a communication is received from a XLKad node, the contact is moved to the end of the queue. Under certain circumstances contacts are removed from the front of the queue. At any time a contact may be added at the end of the list. It must not be possible to add a contact more than once.

Author:
Jim Dixon

Field Summary
static int K
           
 
Constructor Summary
KBucket()
           
 
Method Summary
 int size()
          Returns the number of contacts in the bucket, but is not synchronized.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

K

public static final int K
See Also:
Constant Field Values
Constructor Detail

KBucket

public KBucket()
Method Detail

size

public int size()
Returns the number of contacts in the bucket, but is not synchronized.