code: public void registerMonitor(final Graph.Monitor monitor) {
          if (uiThreadRunner.isOnUiThread()) {
              graph.registerMonitor(monitor);
          } else {
              uiThreadRunner.post(new Runnable() {
                  @Override
                  public void run() {
                      graph.registerMonitor(monitor);
                  }
              });
          }
      }
docs: Register {@link Graph.Monitor} which will be called the graph is about to inject or release an object
  
  @param monitor The monitor