001/*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements.  See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership.  The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License.  You may obtain a copy of the License at
009 *
010 *     http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 */
018package org.apache.hadoop.hbase.client;
019
020import org.apache.yetus.audience.InterfaceAudience;
021
022/**
023 * Enum describing the durability guarantees for tables and {@link Mutation}s Note that the items
024 * must be sorted in order of increasing durability
025 */
026@InterfaceAudience.Public
027public enum Durability {
028  /* Developer note: Do not rename the enum field names. They are serialized in HTableDescriptor */
029  /**
030   * If this is for tables durability, use HBase's global default value (SYNC_WAL). Otherwise, if
031   * this is for mutation, use the table's default setting to determine durability. This must remain
032   * the first option.
033   */
034  USE_DEFAULT,
035  /**
036   * Do not write the Mutation to the WAL
037   */
038  SKIP_WAL,
039  /**
040   * Write the Mutation to the WAL asynchronously
041   */
042  ASYNC_WAL,
043  /**
044   * Write the Mutation to the WAL synchronously. The data is flushed to the filesystem
045   * implementation, but not necessarily to disk. For HDFS this will flush the data to the
046   * designated number of DataNodes. See
047   * <a href="https://issues.apache.org/jira/browse/HADOOP-6313">HADOOP-6313</a>
048   */
049  SYNC_WAL,
050  /**
051   * Write the Mutation to the WAL synchronously and force the entries to disk. See
052   * <a href="https://issues.apache.org/jira/browse/HADOOP-6313">HADOOP-6313</a>
053   */
054  FSYNC_WAL
055}