/*
 * 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.client.file.options;

import alluxio.annotation.PublicApi;

import com.google.common.base.Objects;

import javax.annotation.concurrent.NotThreadSafe;

/**
 * Method options for mounting a path.
 */
@PublicApi
@NotThreadSafe
public final class MountOptions {
  /**
   * @return the default {@link MountOptions}
   */
  public static MountOptions defaults() {
    return new MountOptions();
  }

  private MountOptions() {
    // No options currently
  }

  /**
   * @return the name : value pairs for all the fields
   */
  @Override
  public String toString() {
    return Objects.toStringHelper(this).toString();
  }
}

@@ -586,45 +586,42 @@
 pi;%0A
-%0A
 import 
-com.google.common.base.Object
+alluxio.thrift.MountTOption
 s;%0A%0A
@@ -778,16 +778,46 @@
 tions %7B%0A
+  private boolean mReadOnly;%0A%0A
   /**%0A  
@@ -950,224 +950,1145 @@
 %0A%0A  
-private MountOptions() %7B%0A    // No options currently%0A  %7D%0A%0A  /**%0A   * @return the name : value pairs for all the fields%0A   */%0A  @Override%0A  public String toString() %7B%0A    return Objects.toStringHelper(this).toString()
+/**%0A   * Creates a new instance with default values.%0A   */%0A  private MountOptions() %7B%0A    mReadOnly = false;%0A  %7D%0A%0A  /**%0A   * @return the value of the readonly flag; if true, no write or create operations are allowed%0A   *         under the mount point.%0A   */%0A  public boolean isReadOnly() %7B%0A    return mReadOnly;%0A  %7D%0A%0A  /**%0A   * Sets the readonly flag.%0A   *%0A   * @param readOnly the readonly flag value to use; if true, no write or create operations are%0A   *        allowed under the mount point.%0A   * @return the updated options object%0A   */%0A  public MountOptions setReadOnly(boolean readOnly) %7B%0A    mReadOnly = readOnly;%0A    return this;%0A  %7D%0A%0A  /**%0A   * @return the name : value pairs for all the fields%0A   */%0A  @Override%0A  public String toString() %7B%0A    StringBuilder sb = new StringBuilder(%22MountOptions(%22);%0A    sb.append(super.toString()).append(%22, Readonly: %22).append(mReadOnly);%0A    sb.append(%22)%22);%0A    return sb.toString();%0A  %7D%0A%0A  /**%0A   * @return Thrift representation of the options%0A   */%0A  public MountTOptions toThrift() %7B%0A    MountTOptions options = new MountTOptions();%0A    options.setReadOnly(mReadOnly);%0A    return options
 ;%0A  

Add readOnly flag to client MountOptions