Example #1
0
 @Override
 protected Graph processMethod() throws AsyncException {
   GraphMemBase already = (GraphMemBase) graphs.get(name);
   if (already == null)
     if (strict) throw new DoesNotExistException(name);
     else return createGraph(getHandler(""), name, true);
   else return already.openAgain();
 }
Example #2
0
 /** Create a graph and record it with the given name in the local map. */
 @Override
 public Graph createGraph(ASubCallHandler handler, String name, boolean strict) {
   GraphMemBase already = (GraphMemBase) graphs.get(name);
   if (already == null) {
     Graph result = Factory.createGraphMem();
     graphs.put(name, result);
     return result;
   } else if (strict) throw new AlreadyExistsException(name);
   else return already.openAgain();
 }