agentland.resource.connect
Class OwnerTrackingPermGraph
java.lang.Object
|
+--util.graph.Graph
|
+--util.graph.SignalGraph
|
+--util.graph.PermGraph
|
+--agentland.resource.connect.OwnerTrackingPermGraph
- All Implemented Interfaces:
- Cloneable, Serializable
- Direct Known Subclasses:
- SQLGraph
- public abstract class OwnerTrackingPermGraph
- extends PermGraph
Keep track of what connections exist by tracking the owners of
the various connections. Updates automatically when connections
are broken.
- See Also:
- Serialized Form
Methods inherited from class util.graph.Graph |
addEdge, findNode, getEdges, getEdgesFrom, getNodes, getNonSources, getPath, getSinkNodes, getSinks, getSourceNodes, getSources, removeEdge, removeEdges, removeNode |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OwnerTrackingPermGraph
public OwnerTrackingPermGraph()
newOwner
public void newOwner(Integer owner,
Object from,
Object to)
- Stash owner.
getConnection
public Connection getConnection(Object owner)
- Get the connection an owner owns.
commitPath
public void commitPath(Path path,
Object owner,
int cost)
- Commit a path, booting all the folks who aren't using the edges
for our purposes.
- Overrides:
commitPath
in class SignalGraph
removeOwner
public void removeOwner(Object owner)
- Remove from our hashtables.
- Overrides:
removeOwner
in class SignalGraph
connected
public boolean connected(Object from,
Object to)
- Is from connected to to?
connections
public Vector connections()
- Return list of all current connections.