Class RefreshDiagnostics.RefreshDiagnosticsBuilder
java.lang.Object
growthbook.sdk.java.diagnostics.model.RefreshDiagnostics.RefreshDiagnosticsBuilder
- Enclosing class:
- RefreshDiagnostics
-
Method Summary
Modifier and TypeMethodDescriptionbuild()consecutiveFailures(long consecutiveFailures) Number of failed refresh events since the last successful refresh event.failureCount(long failureCount) Number of failed refresh events observed by the active repository.lastError(ErrorDiagnostics lastError) Most recent refresh/init error, sanitized for diagnostics output.lastFailureAtMillis(Long lastFailureAtMillis) Epoch-millis timestamp of the last failed refresh event.lastLoadedFromCache(Boolean lastLoadedFromCache) Whether the last refresh event loaded feature data from cache.lastSuccessfulRefreshAgeMillis(Long lastSuccessfulRefreshAgeMillis) Age in milliseconds since the last successful feature refresh.lastSuccessfulRefreshAtMillis(Long lastSuccessfulRefreshAtMillis) Epoch-millis timestamp of the last successful feature refresh.millisUntilCacheExpiry(Long millisUntilCacheExpiry) Milliseconds until the current cache expires.nextCacheExpiresAtMillis(Long nextCacheExpiresAtMillis) Epoch-millis timestamp when the current feature cache expires.stale(boolean stale) Whether the current feature data is past its cache expiry.strategy(FeatureRefreshStrategy strategy) Active feature refresh strategy.successCount(long successCount) Number of successful refresh events observed by the active repository.toString()
-
Method Details
-
strategy
Active feature refresh strategy.- Returns:
this.
-
lastSuccessfulRefreshAtMillis
public RefreshDiagnostics.RefreshDiagnosticsBuilder lastSuccessfulRefreshAtMillis(@Nullable Long lastSuccessfulRefreshAtMillis) Epoch-millis timestamp of the last successful feature refresh.- Returns:
this.
-
lastSuccessfulRefreshAgeMillis
public RefreshDiagnostics.RefreshDiagnosticsBuilder lastSuccessfulRefreshAgeMillis(@Nullable Long lastSuccessfulRefreshAgeMillis) Age in milliseconds since the last successful feature refresh.- Returns:
this.
-
nextCacheExpiresAtMillis
public RefreshDiagnostics.RefreshDiagnosticsBuilder nextCacheExpiresAtMillis(@Nullable Long nextCacheExpiresAtMillis) Epoch-millis timestamp when the current feature cache expires.- Returns:
this.
-
millisUntilCacheExpiry
public RefreshDiagnostics.RefreshDiagnosticsBuilder millisUntilCacheExpiry(@Nullable Long millisUntilCacheExpiry) Milliseconds until the current cache expires. Negative values mean it is already stale.- Returns:
this.
-
stale
Whether the current feature data is past its cache expiry.- Returns:
this.
-
successCount
Number of successful refresh events observed by the active repository.- Returns:
this.
-
failureCount
Number of failed refresh events observed by the active repository.- Returns:
this.
-
consecutiveFailures
Number of failed refresh events since the last successful refresh event.- Returns:
this.
-
lastFailureAtMillis
public RefreshDiagnostics.RefreshDiagnosticsBuilder lastFailureAtMillis(@Nullable Long lastFailureAtMillis) Epoch-millis timestamp of the last failed refresh event.- Returns:
this.
-
lastLoadedFromCache
public RefreshDiagnostics.RefreshDiagnosticsBuilder lastLoadedFromCache(@Nullable Boolean lastLoadedFromCache) Whether the last refresh event loaded feature data from cache.- Returns:
this.
-
lastError
Most recent refresh/init error, sanitized for diagnostics output.- Returns:
this.
-
build
-
toString
-