|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface AffinityGraphBuilder
Graph builder interface. Graph builder objects take task access information and create a graph from it, and can return the graph. Builders are also responsible for instantiating the objects which will consume the graph.
The returned graph vertices are identities, and the edges are the object references the vertices have in common. Edge weights refer to the number of common references of all objects (e.g. if obj1 is used twice by both objects, the weight is 2. If both objects then use obj2, the weight becomes 3). Parallel edges are not supported.
Graphs are pruned as time goes by, both to ensure that endless resources are not consumed, and to ensure that while the graph contains enough history to be useful, it doesn't contain too much very old history.
The graphs contain only application information (no system service information) to limit the size of the graphs.
Graph builders are typically instantiated by the node GraphListener.
In order to be instantiated by the GraphListener, they should
implement a constructor taking the arguments
(Properties, ComponentRegistry, TransactionProxy).
The transaction proxy can be null for testing outside of the
Darkstar service framework.
| Method Summary | |
|---|---|
void |
disable()
Disables this builder. |
void |
enable()
Enables this builder. |
edu.uci.ics.jung.graph.UndirectedGraph<LabelVertex,WeightedEdge> |
getAffinityGraph()
Returns the current graph, with identities as vertices, and edges representing each object accessed by both identity endpoints. |
LPAAffinityGroupFinder |
getAffinityGroupFinder()
Returns the affinity group finder created by this builder, or null if none was created. |
LabelVertex |
getVertex(Identity id)
Gets the graph vertex for the given Identity. |
void |
shutdown()
Shuts down this builder. |
void |
updateGraph(Identity owner,
AccessedObjectsDetail detail)
Update the graph based on the objects accessed in a task. |
| Method Detail |
|---|
void updateGraph(Identity owner,
AccessedObjectsDetail detail)
owner - the task owner (the object making the accesses)detail - detailed information about the object accesses, including
a list of the accessed objects
UnsupportedOperationException - if this builder cannot access
the affinity graph. Typically, this occurs because the builder
itself is distributed.
IllegalStateException - if the builder is shut downedu.uci.ics.jung.graph.UndirectedGraph<LabelVertex,WeightedEdge> getAffinityGraph()
The returned graph can not be modified.
UnsupportedOperationException - if this builder cannot access
the affinity graph. Typically, this occurs because the builder
itself is distributed.void enable()
IllegalStateException - if the builder has been shut downvoid disable()
While disabled, no new graph updates are applied, but the graph pruners continue to discard old data.
IllegalStateException - if the builder has been shut downvoid shutdown()
LabelVertex getVertex(Identity id)
Identity.
id - an identity
null if
there is no such vertexLPAAffinityGroupFinder getAffinityGroupFinder()
null if none was created. Some algorithms only create
the finder on the server node.
null
|
RedDwarf, Version 0.10.1 2010-03-14 10:56:12 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||