/*
 * The Alluxio Open Foundation licenses this work under the Apache License, version 2.0
 * (the “License”). You may not use this work except in compliance with the License, which is
 * available at www.apache.org/licenses/LICENSE-2.0
 *
 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied, as more fully set forth in the License.
 *
 * See the NOTICE file distributed with this work for information regarding copyright ownership.
 */

package alluxio.resource;

import java.io.Closeable;

/**
 * A {@code CloseableResource<T>} is a wrapper around a resource of type {@code T} which must do
 * some sort of cleanup when it is no longer in use.
 */
public abstract class CloseableResource<T> implements Closeable {
  private T mResource;

  public CloseableResource(T resource) {
    mResource = resource;
  }

  public T get() {
    return mResource;
  }

  public abstract void close();
}

@@ -715,20 +715,70 @@
 in use.%0A
+ *%0A * @param %3CT%3E the type of the wrapped resource%0A
  */%0A
-
 public a
@@ -859,16 +859,237 @@
 ource;%0A%0A
+  /**%0A   * Creates a %7B@link CloseableResource%3CT%3E%7D wrapper around the given resource. This resource will%0A   * be returned by the %7B@link CloseableResource#get()%7D method.%0A   *%0A   * @param resource the resource to wrap%0A   */%0A
   public
@@ -1144,32 +1144,70 @@
  resource;%0A  %7D%0A%0A
+  /**%0A   * @return the resource%0A   */%0A
   public T get()
@@ -1236,16 +1236,114 @@
 e;%0A  %7D%0A%0A
+  /**%0A   * Performs any cleanup operations necessary when the resource is no longer in use.%0A   */%0A
   public

Add javadocs