All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.distributedlog.thrift.service.ServerStatus Maven / Gradle / Ivy

The newest version!
/**
 * Autogenerated by Thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 */
package org.apache.distributedlog.thrift.service;


import java.util.Map;
import java.util.HashMap;
import org.apache.thrift.TEnum;

public enum ServerStatus implements TEnum {
  WRITE_AND_ACCEPT(100),
  WRITE_ONLY(200),
  DOWN(300);

  private final int value;

  private ServerStatus(int value) {
    this.value = value;
  }

  /**
   * Get the integer value of this enum value, as defined in the Thrift IDL.
   */
  public int getValue() {
    return value;
  }

  /**
   * Find a the enum type by its integer value, as defined in the Thrift IDL.
   * @return null if the value is not found.
   */
  public static ServerStatus findByValue(int value) {
    switch (value) {
      case 100:
        return WRITE_AND_ACCEPT;
      case 200:
        return WRITE_ONLY;
      case 300:
        return DOWN;
      default:
        return null;
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy