Class FixedValueFeature

java.lang.Object
org.apache.bookkeeper.feature.FixedValueFeature
All Implemented Interfaces:
Feature
Direct Known Subclasses:
SettableFeature

public class FixedValueFeature extends Object implements Feature
A feature implementation that has a fixed value of availability.
  • Field Details

    • name

      protected final String name
    • availability

      protected int availability
  • Constructor Details

    • FixedValueFeature

      public FixedValueFeature(String name, int availability)
    • FixedValueFeature

      public FixedValueFeature(String name, boolean available)
  • Method Details

    • name

      public String name()
      Description copied from interface: Feature
      Returns a textual representation of the feature.
      Specified by:
      name in interface Feature
      Returns:
      name of the feature.
    • availability

      public int availability()
      Description copied from interface: Feature
      Returns the availability of this feature, an integer between 0 and 100.
      Specified by:
      availability in interface Feature
      Returns:
      the availability of this feature.
    • isAvailable

      public boolean isAvailable()
      Description copied from interface: Feature
      Whether this feature is available or not.
      Specified by:
      isAvailable in interface Feature
      Returns:
      true if this feature is available, otherwise false.