code: public LockResource lockEdge(Edge edge, LockMode mode) {
      return mEdgeLocks.get(edge, mode);
    }
docs: Acquires an edge lock.
  
  @param edge the edge to lock
  @param mode the mode to lock in
  @return a lock resource which must be closed to release the lock