KeyedFrequencyCap
classKeyedFrequencyCap: Parcelable
| kotlin.Any | |
| ↳ | android.adservices.common.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
| Nested classes | |
|---|---|
|
Builder for creating |
|
| Inherited constants | |
|---|---|
| Public methods | |
|---|---|
| Int | |
| Boolean |
Checks whether the |
| Int |
Returns the ad counter key that the frequency cap is applied to. |
| Duration |
Returns the interval, as a |
| Int |
Returns the maximum count of event occurrences allowed within a given time interval. |
| Int |
hashCode()Returns the hash of the |
| String |
toString()Returns a string representation of the object. |
| Unit |
writeToParcel(dest: Parcel, flags: Int)Flatten this object in to a Parcel. |
| Properties | |
|---|---|
| static Parcelable.Creator<KeyedFrequencyCap!> | |
Public methods
describeContents
fundescribeContents(): Int
Deprecated: Deprecated in Java.
| Return | |
|---|---|
Int |
a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or
|
equals
funequals(other: Any?): Boolean
Deprecated: Deprecated in Java.
Checks whether the KeyedFrequencyCap objects contain the same information.
| Parameters | |
|---|---|
obj |
the reference object with which to compare. |
| Return | |
|---|---|
Boolean |
true if this object is the same as the obj argument; false otherwise. |
getAdCounterKey
fungetAdCounterKey(): Int
Deprecated: Deprecated in Java.
Returns the ad counter key that the frequency cap is applied to.
The ad counter key is defined by an adtech and is an arbitrary numeric identifier which defines any criteria which may have previously been counted and persisted on the device. If the on-device count exceeds the maximum count within a certain time interval, the frequency cap has been exceeded.
| Return | |
|---|---|
Int |
This value cannot be null. |
getInterval
fungetInterval(): Duration
Deprecated: Deprecated in Java.
Returns the interval, as a Duration which will be truncated to the nearest second, over which the frequency cap is calculated.
When this frequency cap is computed, the number of persisted events is counted in the most recent time interval. If the count of previously occurring matching events for an adtech is greater than the number returned by getMaxCount(), the frequency cap has been exceeded, and the ad will not be eligible for ad selection.
| Return | |
|---|---|
Duration |
This value cannot be null. |
getMaxCount
fungetMaxCount(): Int
Deprecated: Deprecated in Java.
Returns the maximum count of event occurrences allowed within a given time interval.
If there are more events matching the ad counter key and ad event type counted on the device within the time interval defined by getInterval(), the frequency cap has been exceeded, and the ad will not be eligible for ad selection.
For example, an ad that specifies a filter for a max count of two within one hour will not be eligible for ad selection if the event has been counted two or more times within the hour preceding the ad selection process.
hashCode
funhashCode(): Int
Deprecated: Deprecated in Java.
Returns the hash of the KeyedFrequencyCap object's data.
| Return | |
|---|---|
Int |
a hash code value for this object. |
toString
funtoString(): String
Deprecated: Deprecated in Java.
Returns a string representation of the object.
| Return | |
|---|---|
String |
a string representation of the object. |
writeToParcel
funwriteToParcel(
dest: Parcel,
flags: Int
): Unit
Deprecated: Deprecated in Java.
Flatten this object in to a Parcel.
| Parameters | |
|---|---|
dest |
Parcel: This value cannot be null. |
flags |
Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of the following:
|