Class FeatureToggle
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.toggle.FeatureToggle
-
public final class FeatureToggle extends java.lang.Object
A feature toggle is registered with theWhiteboard
and can be discovered by third party code to control the state of feature toggles.
-
-
Constructor Summary
Constructors Constructor Description FeatureToggle(java.lang.String name, java.util.concurrent.atomic.AtomicBoolean state)
Create a new adapter with a given name and value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
boolean
isEnabled()
boolean
setEnabled(boolean state)
Changes the state of the feature toggle.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
- Returns:
- the name of the feature toggle.
-
isEnabled
public boolean isEnabled()
- Returns:
- the current state of this feature toggle.
-
setEnabled
public boolean setEnabled(boolean state)
Changes the state of the feature toggle.- Parameters:
state
- the new state of the feature toggle.- Returns:
- the previous state.
-
-