org.objectweb.perseus.dependency.lib

Class BasicDependencyGraph

Implemented Interfaces:
BindingController, DependencyGraph

public final class BasicDependencyGraph
extends java.lang.Object
implements DependencyGraph, BindingController

Author:
S.Chassande-Barrioz

Field Summary

protected Logger
logger
Map
successors

Constructor Summary

BasicDependencyGraph()

Method Summary

boolean
addVertex(Object src, Object dst)
Adds a vertex in the graph, or returns false is this would create a cycle.
boolean
addVertex(Object src, Object dst, Set s)
int
addVertexes(Object src, List dsts)
Add a vertex between a task and a list of other.
void
bindFc(String s, Object o)
Map
getVertexes()
String[]
listFc()
Object
lookupFc(String s)
void
removeVertex(Object src, Object dst)
Removes a vertex in the graph.
void
removeVertexes(List srcs, Object dst)
Removes the vertexes/dependencies between a list of tasks and another.
void
removeVertexes(Object src, List dsts)
Removes the vertexes/dependencies between a task and a list of others.
void
unbindFc(String s)

Field Details

logger

protected Logger logger


successors

public Map successors

Constructor Details

BasicDependencyGraph

public BasicDependencyGraph()

Method Details

addVertex

public boolean addVertex(Object src,
                         Object dst)
Adds a vertex in the graph, or returns false is this would create a cycle.
Specified by:
addVertex in interface DependencyGraph


addVertex

public boolean addVertex(Object src,
                         Object dst,
                         Set s)


addVertexes

public int addVertexes(Object src,
                       List dsts)
Add a vertex between a task and a list of other. If the added vertex creates a cycle, it is not added, and the index (in the list) of the target task is returned, otherwise it return -1.
Specified by:
addVertexes in interface DependencyGraph

Parameters:
src - is the source of the vertex

Returns:
the index (in the list) of the target task is returned, otherwise it return -1.


bindFc

public void bindFc(String s,
                   Object o)


getVertexes

public Map getVertexes()
Specified by:
getVertexes in interface DependencyGraph

See Also:
DependencyGraph.getVertexes()


listFc

public String[] listFc()


lookupFc

public Object lookupFc(String s)


removeVertex

public void removeVertex(Object src,
                         Object dst)
Removes a vertex in the graph.
Specified by:
removeVertex in interface DependencyGraph


removeVertexes

public void removeVertexes(List srcs,
                           Object dst)
Removes the vertexes/dependencies between a list of tasks and another.
Specified by:
removeVertexes in interface DependencyGraph

Parameters:
srcs - is the list of sources of the vertexes
dst - is the target of the vertexes


removeVertexes

public void removeVertexes(Object src,
                           List dsts)
Removes the vertexes/dependencies between a task and a list of others.
Specified by:
removeVertexes in interface DependencyGraph

Parameters:


unbindFc

public void unbindFc(String s)


Copyright © 2000-2002 France Telecom S.A., INRIA, IMAG-LSR All Rights Reserved.