Package io.getunleash.engine
Interface NativeInterface
- All Known Implementing Classes:
FlatInterface
public interface NativeInterface
Represents the native interface for interacting with the Unleash engine.
-
Method Summary
Modifier and TypeMethodDescriptioncheckEnabled(ByteBuffer contextMessage) Checks if a feature is enabled.checkVariant(ByteBuffer contextMessage) Get active variant for togglevoidFrees the memory allocated for the engine.Get metrics for the engine.getState()Retrieves the current state of the engine.List known toggles.Loads state into the engine.
-
Method Details
-
freeEngine
void freeEngine()Frees the memory allocated for the engine. -
takeState
Loads state into the engine.- Parameters:
toggles- The state to load.
-
getState
String getState()Retrieves the current state of the engine.- Returns:
- The current state of the engine.
-
checkEnabled
Checks if a feature is enabled.- Parameters:
contextMessage- The context message to use for the check.- Returns:
- The result of the check.
-
checkVariant
Get active variant for toggle- Parameters:
contextMessage- The context message to use for the check.- Returns:
- The active variant for the toggle.
-
getMetrics
MetricsResponse getMetrics()Get metrics for the engine.- Returns:
- The metrics for the engine.
-
listKnownToggles
FeatureDefs listKnownToggles()List known toggles.- Returns:
- The list of known toggles.
-