@ExperimentalFeatures.Ext8OptIn
public final class KeyedFrequencyCap


A frequency cap for a specific ad counter key.

Frequency caps define the maximum rate an event can occur within a given time interval. If the frequency cap is exceeded, the associated ad will be filtered out of ad selection.

Summary

Public constructors

KeyedFrequencyCap(
    int adCounterKey,
    int maxCount,
    @NonNull Duration interval
)

Public methods

boolean
equals(Object other)

Checks whether two KeyedFrequencyCap objects contain the same information.

final int

The ad counter key that the frequency cap is applied to

final @NonNull Duration

The interval, as a Duration over which the frequency cap is calculated

final int

The maximum count of event occurrences allowed within a given time interval

int

Returns the hash of the KeyedFrequencyCap object's data.

@NonNull String

Overrides the toString method.

Public constructors

KeyedFrequencyCap

Added in 1.1.0-beta07
public KeyedFrequencyCap(
    int adCounterKey,
    int maxCount,
    @NonNull Duration interval
)
Parameters
int adCounterKey

The ad counter key that the frequency cap is applied to

int maxCount

The maximum count of event occurrences allowed within a given time interval

@NonNull Duration interval

The interval, as a Duration over which the frequency cap is calculated

Public methods

equals

public boolean equals(Object other)

Checks whether two KeyedFrequencyCap objects contain the same information.

getAdCounterKey

Added in 1.1.0-beta07
public final int getAdCounterKey()

The ad counter key that the frequency cap is applied to

getInterval

Added in 1.1.0-beta07
public final @NonNull Duration getInterval()

The interval, as a Duration over which the frequency cap is calculated

getMaxCount

Added in 1.1.0-beta07
public final int getMaxCount()

The maximum count of event occurrences allowed within a given time interval

hashCode

public int hashCode()

Returns the hash of the KeyedFrequencyCap object's data.

toString

public @NonNull String toString()

Overrides the toString method.