|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpeersim.pastry.RoutingTable
public class RoutingTable
Field Summary | |
---|---|
int |
cols
|
static java.math.BigInteger |
EMPTY
Use this to indicates a entry in the table is not filled |
int |
rows
|
java.math.BigInteger[][] |
table
all these methods are public in order to provide the fastest possible access |
Constructor Summary | |
---|---|
RoutingTable(int rows,
int cols)
instanciates a new empty routing table with the specified size |
Method Summary | |
---|---|
java.math.BigInteger |
accessItem(int prefixlen,
char nextChar)
Provide direct access to the item of the MSPastry routing table, by selecting the associated entry o fthe table with the given prefix length and the given next cipher |
java.lang.Object |
clone()
|
void |
copyRowFrom(RoutingTable otherRT,
int i)
|
java.math.BigInteger |
get(int rows,
int cols)
|
boolean |
removeNodeId(java.math.BigInteger b)
Given a non-null Node Id, it will be removed from the table. |
void |
set(int row,
int column,
java.math.BigInteger value)
|
java.lang.String |
toString()
print a string representation of the table |
java.lang.String |
toString(java.math.BigInteger nodeId)
|
static java.lang.String |
truncateNodeId(java.math.BigInteger b)
given a NodeId value, it returns an hexadecimal representation and truncate it on the 4th cipher, for instance truncateNodeId(new BigInteger(0xABCDEF0123)) returns "abcd-". |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.math.BigInteger EMPTY
public java.math.BigInteger[][] table
public int rows
public int cols
Constructor Detail |
---|
public RoutingTable(int rows, int cols)
rows
- intcols
- intMethod Detail |
---|
public java.math.BigInteger get(int rows, int cols)
public void set(int row, int column, java.math.BigInteger value)
public java.math.BigInteger accessItem(int prefixlen, char nextChar)
prefixlen
- intnextChar
- char
public java.lang.Object clone()
clone
in class java.lang.Object
public void copyRowFrom(RoutingTable otherRT, int i)
public boolean removeNodeId(java.math.BigInteger b)
b
- BigInteger node to remove from the routing table. if null is specified
this method does nothing
public static final java.lang.String truncateNodeId(java.math.BigInteger b)
b
- BigInteger
public java.lang.String toString(java.math.BigInteger nodeId)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |