View Javadoc

1   /**
2    * Autogenerated by Thrift Compiler (0.8.0)
3    *
4    * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5    *  @generated
6    */
7   package org.apache.hadoop.hbase.thrift2.generated;
8   
9   
10  import java.util.Map;
11  import java.util.HashMap;
12  import org.apache.thrift.TEnum;
13  
14  /**
15   * Specify Durability:
16   *  - SKIP_WAL means do not write the Mutation to the WAL.
17   *  - ASYNC_WAL means write the Mutation to the WAL asynchronously,
18   *  - SYNC_WAL means write the Mutation to the WAL synchronously,
19   *  - FSYNC_WAL means Write the Mutation to the WAL synchronously and force the entries to disk.
20   */
21  public enum TDurability implements org.apache.thrift.TEnum {
22    SKIP_WAL(1),
23    ASYNC_WAL(2),
24    SYNC_WAL(3),
25    FSYNC_WAL(4);
26  
27    private final int value;
28  
29    private TDurability(int value) {
30      this.value = value;
31    }
32  
33    /**
34     * Get the integer value of this enum value, as defined in the Thrift IDL.
35     */
36    public int getValue() {
37      return value;
38    }
39  
40    /**
41     * Find a the enum type by its integer value, as defined in the Thrift IDL.
42     * @return null if the value is not found.
43     */
44    public static TDurability findByValue(int value) { 
45      switch (value) {
46        case 1:
47          return SKIP_WAL;
48        case 2:
49          return ASYNC_WAL;
50        case 3:
51          return SYNC_WAL;
52        case 4:
53          return FSYNC_WAL;
54        default:
55          return null;
56      }
57    }
58  }