Package com.google.gerrit.server

Examples of com.google.gerrit.server.RequestCleanup


  protected <T> Callable<T> cleanup(final Callable<T> callable) {
    return new Callable<T>() {
      @Override
      public T call() throws Exception {
        RequestCleanup cleanup = scope.scope(
            Key.get(RequestCleanup.class),
            new Provider<RequestCleanup>() {
              @Override
              public RequestCleanup get() {
                return new RequestCleanup();
              }
            }).get();

        try {
          return callable.call();
        } finally {
          cleanup.run();
        }
      }
    };
  }
View Full Code Here


    final long created;
    volatile long started;
    volatile long finished;

    private Context(final SshSession s, final String c, final long at) {
      cleanup = new RequestCleanup();
      session = s;
      commandLine = c;

      map = new HashMap<Key<?>, Object>();
      map.put(RC_KEY, cleanup);
View Full Code Here

    final long created;
    volatile long started;
    volatile long finished;

    Context(final SshSession s, final String c) {
      cleanup = new RequestCleanup();
      session = s;
      commandLine = c;

      map = new HashMap<Key<?>, Object>();
      map.put(RC_KEY, cleanup);
View Full Code Here

      started = now;
      finished = now;
    }

    private Context(Context p, SshSession s, String c) {
      cleanup = new RequestCleanup();
      session = s;
      commandLine = c;

      map = new HashMap<Key<?>, Object>();
      map.put(RC_KEY, cleanup);
View Full Code Here

TOP

Related Classes of com.google.gerrit.server.RequestCleanup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.