Package growthbook.sdk.java.repository
Interface IGBFeaturesRepository
- All Known Implementing Classes:
GBFeaturesRepository,LocalGbFeatureRepository,NativeJavaGbFeatureRepository
public interface IGBFeaturesRepository
INTERNAL: Interface that is used internally for the
GBFeaturesRepository-
Method Summary
Modifier and TypeMethodDescriptionvoidClears the feature refresh callbacksRequired implementation to get the featuresJsondefault ThrowableReturns the most recent feature refresh error, if any.default longReturns the epoch-millis timestamp of the most recent feature refresh error.default longdefault Booleandefault longdefault longdefault longvoidvoidinitialize(Boolean retryOnFailure) voidonFeaturesRefresh(FeatureRefreshCallback callback)
-
Method Details
-
initialize
- Throws:
FeatureFetchException
-
initialize
- Throws:
FeatureFetchException
-
getFeaturesJson
String getFeaturesJson()Required implementation to get the featuresJson- Returns:
- featuresJson String
-
onFeaturesRefresh
-
clearCallbacks
void clearCallbacks()Clears the feature refresh callbacks -
getLastRefreshError
Returns the most recent feature refresh error, if any. Used for diagnostics only.- Returns:
- the last refresh
Throwable, ornullwhen no refresh has failed
-
getLastRefreshErrorAtMillis
default long getLastRefreshErrorAtMillis()Returns the epoch-millis timestamp of the most recent feature refresh error. Used for diagnostics only.- Returns:
- the timestamp in milliseconds, or
0when no refresh has failed
-
getRefreshSuccessCount
default long getRefreshSuccessCount() -
getRefreshFailureCount
default long getRefreshFailureCount() -
getRefreshConsecutiveFailureCount
default long getRefreshConsecutiveFailureCount() -
getLastRefreshFailureAtMillis
default long getLastRefreshFailureAtMillis() -
getLastRefreshLoadedFromCache
-