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

Fields inherited from class util.graph.Graph
edges, nodes
 
Constructor Summary
OwnerTrackingPermGraph()
           
 
Method Summary
 void commitPath(Path path, Object owner, int cost)
          Commit a path, booting all the folks who aren't using the edges for our purposes.
 boolean connected(Object from, Object to)
          Is from connected to to?
 Vector connections()
          Return list of all current connections.
 Connection getConnection(Object owner)
          Get the connection an owner owns.
 void newOwner(Integer owner, Object from, Object to)
          Stash owner.
 void removeOwner(Object owner)
          Remove from our hashtables.
 
Methods inherited from class util.graph.PermGraph
addEdge, loadEdge, loadGraph, openTable, saveEdge, saveGraph
 
Methods inherited from class util.graph.SignalGraph
commitEdge, getDisplaced, makeEdge, makePath
 
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
 

Constructor Detail

OwnerTrackingPermGraph

public OwnerTrackingPermGraph()
Method Detail

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.