|
||||||||||
| 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.dgb.DistGraphBuilderServerImpl
public class DistGraphBuilderServerImpl
The server side of a distributed graph builder for label propagation. It builds a single graph representing all information for the entire system using the single node graph builder, and uses a single node label propagation implementation to process the graph. This LPA implementation is expected to be useful for simple multi-node testing. It may have scalability problems due to the amount of data being sent from each node, and the size of the affinity graph and related data structures. It has no dependencies on new multi-node parts of the system.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.sun.sgs.impl.service.nodemap.affinity.BasicState |
|---|
BasicState.State |
| Field Summary | |
|---|---|
static int |
DEFAULT_SERVER_PORT
The default value of the server port. |
static String |
SERVER_EXPORT_NAME
The name we export ourselves under. |
static String |
SERVER_PORT_PROPERTY
The property name for the server port. |
| 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 | |
|---|---|
DistGraphBuilderServerImpl(ComponentRegistry systemRegistry,
TransactionProxy txnProxy,
Properties properties,
long nodeId)
Creates a distributed graph builder server. |
|
| Method Summary | |
|---|---|
void |
disable()
Disables this builder. |
void |
enable()
Enables this builder. |
NavigableSet<RelocatingAffinityGroup> |
findAffinityGroups()
Finds affinity groups across all nodes in the Darkstar cluster. |
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 |
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)
Update the graph based on the objects accessed in a task. |
| 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 |
| Field Detail |
|---|
public static final String SERVER_PORT_PROPERTY
public static final int DEFAULT_SERVER_PORT
public static final String SERVER_EXPORT_NAME
| Constructor Detail |
|---|
DistGraphBuilderServerImpl(ComponentRegistry systemRegistry,
TransactionProxy txnProxy,
Properties properties,
long nodeId)
throws Exception
systemRegistry - the registry of available system componentstxnProxy - the transaction proxyproperties - application propertiesnodeId - the core server node id
Exception - if an error occurs| Method Detail |
|---|
public void updateGraph(Identity owner,
Object[] objIds)
updateGraph in interface DistGraphBuilderServerowner - the task owner (the object making the accesses)objIds - the object IDs of objects accessed by the ownerpublic void disable()
While disabled, no new graph updates are applied, but the graph pruners continue to discard old data.
disable in interface AffinityGroupFinderdisable in interface AffinityGraphBuilderpublic void enable()
enable in interface AffinityGroupFinderenable in interface AffinityGraphBuilderpublic void shutdown()
shutdown in interface AffinityGroupFindershutdown in interface AffinityGraphBuilderpublic LPAAffinityGroupFinder getAffinityGroupFinder()
null if none was created. Some algorithms only create
the finder on the server node.
getAffinityGroupFinder in interface AffinityGraphBuildernull
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 objectspublic edu.uci.ics.jung.graph.UndirectedGraph<LabelVertex,WeightedEdge> getAffinityGraph()
The returned graph can not be modified.
getAffinityGraph in interface AffinityGraphBuilderpublic LabelVertex getVertex(Identity id)
Identity.
getVertex in interface AffinityGraphBuilderid - an identity
null if
there is no such vertexpublic Runnable getPruneTask()
UnsupportedOperationException - if this builder does not support
graph pruning.
public NavigableSet<RelocatingAffinityGroup> findAffinityGroups()
throws AffinityGroupFinderFailedException
AffinityGroupFinderFailedException
is thrown. Errors include nodes not responding to server requests.
The returned groups contain node assignment information for the identities. This information is looked up from the node mapping service. Alternatively, we could create a new graph node type and track this information based on which application node called updateGraph. While this would be some work, it might be worthwhile to implement if we find this LPA implementation is useful in deployed systems.
findAffinityGroups in interface LPAAffinityGroupFinderAffinityGroupFinderFailedException - if there is an error
|
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 | |||||||||