|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.sgs.impl.service.nodemap.affinity.BasicState
com.sun.sgs.impl.service.nodemap.affinity.graph.AbstractAffinityGraphBuilder
com.sun.sgs.impl.service.nodemap.affinity.single.SingleGraphBuilder
public class SingleGraphBuilder
A minimal graph builder for single node testing. This is mostly a copy of the WeightedGraphBuilder, with the parts about node conflicts deleted.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.sun.sgs.impl.service.nodemap.affinity.BasicState |
|---|
BasicState.State |
| Field Summary |
|---|
| Fields inherited from class com.sun.sgs.impl.service.nodemap.affinity.graph.AbstractAffinityGraphBuilder |
|---|
DEFAULT_PERIOD, DEFAULT_PERIOD_COUNT, logger, PERIOD_COUNT_PROPERTY, PERIOD_PROPERTY, periodCount, PROP_BASE, snapshot, wrappedProps |
| Fields inherited from class com.sun.sgs.impl.service.nodemap.affinity.BasicState |
|---|
state |
| Constructor Summary | |
|---|---|
SingleGraphBuilder(Properties properties,
ComponentRegistry systemRegistry,
TransactionProxy txnProxy)
Creates a weighted graph builder and its JMX MBean. |
|
SingleGraphBuilder(Properties properties,
ComponentRegistry systemRegistry,
TransactionProxy txnProxy,
boolean needStats)
Creates a weighted graph builder. |
|
| 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. |
Runnable |
getPruneTask()
Get the task which prunes the graph. |
LabelVertex |
getVertex(Identity id)
Gets the graph vertex for the given Identity. |
void |
setStats(AffinityGraphBuilderStats stats)
Sets the JMX MBean for this builder. |
void |
shutdown()
Shuts down this builder. |
void |
updateGraph(Identity owner,
AccessedObjectsDetail detail)
Update the graph based on the objects accessed in a task. |
void |
updateGraph(Identity owner,
Object[] objIds)
Updates the graph with the given identity and object ids. |
| Methods inherited from class com.sun.sgs.impl.service.nodemap.affinity.BasicState |
|---|
checkForDisabledOrShutdownState, checkForShutdownState, setDisabledState, setEnabledState, setShutdownState |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SingleGraphBuilder(Properties properties,
ComponentRegistry systemRegistry,
TransactionProxy txnProxy)
throws Exception
properties - the properties for configuring this buildersystemRegistry - the registry of available system componentstxnProxy - the transaction proxy
Exception - if an error occurs
public SingleGraphBuilder(Properties properties,
ComponentRegistry systemRegistry,
TransactionProxy txnProxy,
boolean needStats)
throws Exception
needStats is false, the stats object must be provided
with a call to setStats or a NullPointerException will
be thrown on the first call to updateGraph.
properties - the properties for configuring this buildersystemRegistry - the registry of available system componentstxnProxy - the transaction proxyneedStats - true if stats should be constructed
Exception - if an error occurs| Method Detail |
|---|
public void updateGraph(Identity owner,
AccessedObjectsDetail detail)
updateGraph in interface AffinityGraphBuilderowner - the task owner (the object making the accesses)detail - detailed information about the object accesses, including
a list of the accessed objects
public void updateGraph(Identity owner,
Object[] objIds)
This method may be called by multiple threads and must protect itself from changes to data structures made by the pruner.
owner - the identity which accessed the objectsobjIds - the object ids of objects accessed by the identitypublic edu.uci.ics.jung.graph.UndirectedGraph<LabelVertex,WeightedEdge> getAffinityGraph()
The returned graph can not be modified.
getAffinityGraph in interface AffinityGraphBuilderpublic void enable()
enable in interface AffinityGraphBuilderpublic void disable()
While disabled, no new graph updates are applied, but the graph pruners continue to discard old data.
disable in interface AffinityGraphBuilderpublic void shutdown()
shutdown in interface AffinityGraphBuilderpublic LabelVertex getVertex(Identity id)
Identity.
getVertex in interface AffinityGraphBuilderid - an identity
null if
there is no such vertexpublic LPAAffinityGroupFinder getAffinityGroupFinder()
null if none was created. Some algorithms only create
the finder on the server node.
getAffinityGroupFinder in interface AffinityGraphBuildernullpublic void setStats(AffinityGraphBuilderStats stats)
NullPointerException will
occur.
stats - our JMX informationpublic Runnable getPruneTask()
UnsupportedOperationException - if this builder does not support
graph pruning.
|
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 | |||||||||