6.2.2.3.4.1 Types
The following new types are used to represent and to evaluate site graphs:
-
/***** REPL_INFO *****/ /* Replication parameters of a graph edge. */ struct REPLINFO { DWORD Cost; /* Cost of network traffic between * vertices; lower is preferred. */ DWORD Interval; /* Interval between replication attempts. */ DWORD Options; /* siteLink object options bits. */ SCHEDULE Schedule; /* Schedule during which communication is possible; NULL means "always". */ } /***** COLOR *****/ /* Color of a vertex. */ enum COLOR { RED, /* Site contains one or more full replicas. */ BLACK, /* Site contains no full replicas but one or more * partial replicas. */ WHITE /* Site contains no replicas. */ } /***** VERTEX *****/ /* A vertex in the site graph. */ struct VERTEX { GUID ID; /* objectGUID of corresponding site * object. */ SEQUENCE<GUID> EdgeIDs; /* Edges currently being evaluated * for this vertex. */ COLOR Color; /* Color of the vertex. */ SEQUENCE<GUID> AcceptRedRed; /* Edge types accepted when both * vertices are RED. */ SEQUENCE<GUID> AcceptBlack; /* Edge types accepted when one or * both vertices are BLACK. */ REPLINFO ReplInfo; /* Replication parameters. */ int DistToRed; /* Distance in the spanning tree * from this vertex to the nearest * red vertex. */ /* Dijkstra data */ GUID RootID; /* The ID of the closest RED or * BLACK vertex. */ bool Demoted; /* TRUE if vertex should be treated * as if Color is WHITE. */ /* Kruskal data */ GUID ComponentID; /* The id of the graph component * this vertex is in. */ int ComponentIndex; /* The index of the graph component. */ } /***** MULTIEDGE *****/ /* Fully connected subgraph of vertices. */ struct MULTIEDGE { GUID ID; /* objectGUID of corresponding siteLink * object. */ SEQUENCE<GUID> VertexIDs; /* IDs of connected vertices. */ GUID Type; /* Type (interSiteTransport * objectGUID). */ REPLINFO ReplInfo; /* Replication parameters. */ bool Directed; /* TRUE if uni-directional, FALSE if * bi-directional */ } /***** MULTIEDGESET *****/ /* Set of transitively connected MULTIEDGEs. All edges within the set * have the same Type. */ struct MULTIEDGESET { GUID ID; /* objectGUID of corresponding * siteLinkBridge object. */ SEQUENCE<GUID> EdgeIDs; /* IDs of connected edges. */ } /***** GRAPH *****/ /* A site graph. */ struct GRAPH { SEQUENCE<VERTEX> Vertices; /* All vertices, sorted by * ascending ID (site * objectGUID). */ SEQUENCE<MULTIEDGE> Edges; /* All edges. */ SEQUENCE<MULTIEDGESET> EdgeSets; /* All edge sets. */ } /***** INTERNALEDGE *****/ /* Path found in the graph between two non-WHITE vertices. */ struct INTERNALEDGE { GUID V1ID, V2ID; /* The endpoints of the path. */ bool RedRed; /* TRUE if and only both endpoints are red. */ REPLINFO ReplInfo; /* Combined replication info for the path. */ GUID Type; /* All path edges must have same type. */ }