All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.launchdarkly.sdk.server.interfaces.BigSegmentsConfiguration Maven / Gradle / Ivy

There is a newer version: 7.5.0
Show newest version
package com.launchdarkly.sdk.server.interfaces;

import com.launchdarkly.sdk.server.integrations.BigSegmentsConfigurationBuilder;

import java.time.Duration;

/**
 * Encapsulates the SDK's configuration with regard to Big Segments.
 * 

* Big Segments are a specific type of user segments. For more information, read the * LaunchDarkly documentation * . *

* See {@link BigSegmentsConfigurationBuilder} for more details on these properties. * * @see BigSegmentsConfigurationBuilder * @since 5.7.0 */ public final class BigSegmentsConfiguration { private final BigSegmentStore bigSegmentStore; private final int userCacheSize; private final Duration userCacheTime; private final Duration statusPollInterval; private final Duration staleAfter; /** * Creates a new {@link BigSegmentsConfiguration} instance with the specified values. *

* See {@link BigSegmentsConfigurationBuilder} for more information on the configuration fields. * * @param bigSegmentStore the Big Segments store instance * @param userCacheSize the user cache size * @param userCacheTime the user cache time * @param statusPollInterval the status poll interval * @param staleAfter the interval after which store data is considered stale */ public BigSegmentsConfiguration(BigSegmentStore bigSegmentStore, int userCacheSize, Duration userCacheTime, Duration statusPollInterval, Duration staleAfter) { this.bigSegmentStore = bigSegmentStore; this.userCacheSize = userCacheSize; this.userCacheTime = userCacheTime; this.statusPollInterval = statusPollInterval; this.staleAfter = staleAfter; } /** * Gets the data store instance that is used for Big Segments data. * * @return the configured Big Segment store */ public BigSegmentStore getStore() { return this.bigSegmentStore; } /** * Gets the value set by {@link BigSegmentsConfigurationBuilder#userCacheSize(int)} * * @return the configured user cache size limit */ public int getUserCacheSize() { return this.userCacheSize; } /** * Gets the value set by {@link BigSegmentsConfigurationBuilder#userCacheTime(Duration)} * * @return the configured user cache time duration */ public Duration getUserCacheTime() { return this.userCacheTime; } /** * Gets the value set by {@link BigSegmentsConfigurationBuilder#statusPollInterval(Duration)} * * @return the configured status poll interval */ public Duration getStatusPollInterval() { return this.statusPollInterval; } /** * Gets the value set by {@link BigSegmentsConfigurationBuilder#staleAfter(Duration)} * * @return the configured stale after interval */ public Duration getStaleAfter() { return this.staleAfter; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy