Package org.apache.bookkeeper.feature
Class FixedValueFeature
- java.lang.Object
-
- org.apache.bookkeeper.feature.FixedValueFeature
-
- All Implemented Interfaces:
Feature
- Direct Known Subclasses:
SettableFeature
public class FixedValueFeature extends java.lang.Object implements Feature
A feature implementation that has a fixed value of availability.
-
-
Field Summary
Fields Modifier and Type Field Description protected int
availability
protected java.lang.String
name
-
Fields inherited from interface org.apache.bookkeeper.feature.Feature
FEATURE_AVAILABILITY_MAX_VALUE
-
-
Constructor Summary
Constructors Constructor Description FixedValueFeature(java.lang.String name, boolean available)
FixedValueFeature(java.lang.String name, int availability)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
availability()
Returns the availability of this feature, an integer between 0 and 100.boolean
isAvailable()
Whether this feature is available or not.java.lang.String
name()
Returns a textual representation of the feature.
-
-
-
Method Detail
-
name
public java.lang.String name()
Description copied from interface:Feature
Returns a textual representation 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 interfaceFeature
- 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 interfaceFeature
- Returns:
- true if this feature is available, otherwise false.
-
-