|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ostore.tapestry.impl.TapestryVerifier
An object of this class can be used to verify certain properties
about a Tapestry network, given complete knowledge about the network.
For example, given everyone's Guids and RoutingTables, it can
verify the correctness of each RoutingTable.
Once a TapestryVerifier has first been populated with data (either through
the constructor or a call to addData), that will be the only kind
of data the object will accept. For example, if you construct a
TapestryVerifier with the (guids[], tables[]) constructor, you cannot
later call the addData( guid, table, revpointers) method.
Inner Class Summary | |
class |
TapestryVerifier.Tree
Organizes guids into a tree-like data structure that makes it easy to tell who should know about each other. |
Field Summary | |
static String |
ERROR_BAD_GUID_DIGITS
|
static String |
ERROR_BAD_LAT_ORDER
|
static String |
ERROR_BAD_REVPOINTER
|
static String |
ERROR_DUPLICATE_GUID
|
static String |
ERROR_GUID_NOT_IN_REVS
|
static String |
ERROR_NO_DATA
|
static String |
ERROR_NO_GUID
|
static String |
ERROR_NO_LAT
|
static String |
ERROR_ROUTING_HOLE
|
Constructor Summary | |
TapestryVerifier()
Create an empty TapestryVerifier, and fill it up with data one at a time later. |
|
TapestryVerifier(SecureHash[] guids,
RoutingTable[] tables)
Create a TapestryVerifier that can verify that every RoutingTable is correct as well. |
|
TapestryVerifier(SecureHash[] guids,
RoutingTable[] tables,
HashMap[] revpointers)
Create a TapestryVerifier that can verify that every RoutingTable is correct as well, and also verify that every revpointers map is correct. |
Method Summary | |
void |
addData(SecureHash guid,
RoutingTable table)
Consider more data. |
void |
addData(SecureHash guid,
RoutingTable table,
HashMap revpointers)
Consider more data. |
String |
getErrors()
Return the String of all the errors from the last verify. |
static void |
main(String[] args)
|
void |
printErrors()
Prints the errors from the last verify() call to STDOUT. |
void |
reset()
This should be called when getting ready to populate this Verifier with a new set of data, or if the guids of any nodes have changed. |
boolean |
verify()
Verify all the info we have about this Tapestry network. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String ERROR_NO_GUID
public static final String ERROR_NO_DATA
public static final String ERROR_BAD_GUID_DIGITS
public static final String ERROR_NO_LAT
public static final String ERROR_BAD_LAT_ORDER
public static final String ERROR_GUID_NOT_IN_REVS
public static final String ERROR_ROUTING_HOLE
public static final String ERROR_BAD_REVPOINTER
public static final String ERROR_DUPLICATE_GUID
Constructor Detail |
public TapestryVerifier()
public TapestryVerifier(SecureHash[] guids, RoutingTable[] tables)
guids
- An array of all known guids in the network.tables
- An array of all RoutingTables for all nodes, in the
same order as the corresponding guids.public TapestryVerifier(SecureHash[] guids, RoutingTable[] tables, HashMap[] revpointers)
guids
- An array of all known guids in the network.tables
- An array of all RoutingTables for all nodes, in the
same order as the corresponding guids.revpointers
- An array of the revpointer HashMaps for all
nodes, in the same order as the
corresponding guids.Method Detail |
public void addData(SecureHash guid, RoutingTable table)
guid
- a guid of a node in the networktable
- the RoutingTable of the nodepublic void addData(SecureHash guid, RoutingTable table, HashMap revpointers)
guid
- a guid of a node in the networktable
- the RoutingTable of the noderevpointers
- the reverse pointers of the nodepublic void printErrors()
public String getErrors()
public void reset()
public boolean verify()
public static void main(String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |