src/main/java/com/infilos/DAGraph.java
/**
     * add edge
     *
     * @param source     node of origin
     * @param target     node of destination
     * @param edge       edge description
     * @param createable whether the node needs to be created if it does not exist
     *
     * @return The result of adding an edge. returns false if the DAG result is a ring result
     */
add edge
@param source     node of origin
@param target     node of destination
@param edge       edge description
@param createable whether the node needs to be created if it does not exist

@return The result of adding an edge. returns false if the DAG result is a ring result
add edge @param source node of origin @param target node of destination @param edge edge description @param createable whether the node needs to be created if it does not exist @return The result of adding an edge . returns false if the DAG result is a ring result
public boolean addEdge(Node source, Node target, EdgeMeta edge, boolean createable) {
        lock.writeLock().lock();
        try {
            if (!isLegalAddEdge(source, target, createable)) {
                logger.error("Serious error: add edge({} -> {}) is invalid, cause cycle！", source, target);
                return false;
            }
            addNodeIfAbsent(source, null);
            addNodeIfAbsent(target, null);
            addEdge(source, target, edge, forwardEdges);
            addEdge(target, source, edge, reverseEdges);
            return true;
        } finally {
            lock.writeLock().unlock();
        }
    }
public boolean addEdge ( Node source , Node target , EdgeMeta edge , boolean createable ) { lock . writeLock ( ) . lock ( ) ; try { if ( ! isLegalAddEdge ( source , target , createable ) ) { logger . error ( "Serious error: add edge({} -> {}) is invalid, cause cycle！",  s urce,  t rget); return false ; } addNodeIfAbsent ( source , null ) ; addNodeIfAbsent ( target , null ) ; addEdge ( source , target , edge , forwardEdges ) ; addEdge ( target , source , edge , reverseEdges ) ; return true ; } finally { lock . writeLock ( ) . unlock ( ) ; } }
add edge
 @param source     node of origin
 @param target     node of destination
 @param edge       edge description
 @param createable whether the node needs to be created if it does not exist
add edge @param source node of origin @param target node of destination @param edge edge description @param createable whether the node needs to be created if it does not exist
// Whether an edge can be successfully added(source -> target)