|
||||||||||
| 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.dlpa.graph.BipartiteGraphBuilder
public class BipartiteGraphBuilder
A graph builder which builds a bipartite graph of identities and object ids, with edges between them. Identities are never linked with other edges, nor are object ids linked to other object ids.
This graph builder folds the graph upon request. The folded graph does not contain parallel edges.
| 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 | |
|---|---|
BipartiteGraphBuilder(Properties properties,
ComponentRegistry systemRegistry,
TransactionProxy txnProxy)
Constructs a new bipartite 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. |
Map<Long,Map<Object,Long>> |
getConflictMap()
Returns a map of detected cross node data conflicts. |
Map<Object,Map<Identity,Long>> |
getObjectUseMap()
Returns a map of local object uses to the identities that used the objects, and a count of the number of uses. |
Runnable |
getPruneTask()
Get the task which prunes the graph. |
LabelVertex |
getVertex(Identity id)
Gets the graph vertex for the given Identity. |
void |
noteConflictDetected(Object objId,
long nodeId,
boolean forUpdate)
TBD: This will be the implementation of our conflict detection listener. |
void |
removeNode(long nodeId)
Note that a node has failed. |
void |
shutdown()
Shuts down this builder. |
void |
updateGraph(Identity owner,
AccessedObjectsDetail detail)
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 |
| Constructor Detail |
|---|
public BipartiteGraphBuilder(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| 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 objectspublic LabelVertex getVertex(Identity id)
Identity.
getVertex in interface AffinityGraphBuilderid - an identity
null if
there is no such vertexpublic edu.uci.ics.jung.graph.UndirectedGraph<LabelVertex,WeightedEdge> getAffinityGraph()
The returned graph can not be modified.
getAffinityGraph in interface AffinityGraphBuilderpublic Map<Long,Map<Object,Long>> getConflictMap()
getConflictMap in interface DLPAGraphBuilderpublic Map<Object,Map<Identity,Long>> getObjectUseMap()
getObjectUseMap in interface DLPAGraphBuilder
public void noteConflictDetected(Object objId,
long nodeId,
boolean forUpdate)
objId - the object that was evictednodeId - the node that caused the evictionforUpdate - true if this eviction was for an update,
false if it was for read only accesspublic void removeNode(long nodeId)
nodeId is
unknown or has already been noted as failed.
removeNode in interface DLPAGraphBuildernodeId - the id of the failed nodepublic void disable()
While disabled, no new graph updates are applied, but the graph pruners continue to discard old data.
disable in interface AffinityGraphBuilderpublic void enable()
enable in interface AffinityGraphBuilderpublic void shutdown()
shutdown in interface AffinityGraphBuilderpublic LPAAffinityGroupFinder getAffinityGroupFinder()
null if none was created. Some algorithms only create
the finder on the server node.
getAffinityGroupFinder in interface AffinityGraphBuildernullpublic 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 | |||||||||