Target filter
Search Kotlin docs
  • Platforms
  • Tealium Prism Kotlin
core/com.tealium.prism.core.api.persistence/Expiry/Companion

Companion

object Companion

Properties

FOREVER
Link copied to clipboard
@JvmField
val FOREVER: Expiry

Specific Expiry case that should never expire.

SESSION
Link copied to clipboard
@JvmField
val SESSION: Expiry

Specific Expiry case that should be tied the lifetime of the current session.

UNTIL_RESTART
Link copied to clipboard
@JvmField
val UNTIL_RESTART: Expiry

Specific Expiry case that should be tied the lifetime of the application launch.

Functions

afterDate
Link copied to clipboard
@JvmStatic
@JvmOverloads
fun afterDate(days: Int, hours: Int, minutes: Int, seconds: Int, fromTime: Long = getTimestamp()): Expiry
afterEpochTime
Link copied to clipboard
@JvmStatic
fun afterEpochTime(timeInSeconds: Long): Expiry

Allows you to set a specific Epoch time in seconds for which to expire.

afterTimeUnit
Link copied to clipboard
@JvmStatic
@JvmOverloads
fun afterTimeUnit(value: Long, unit: TimeUnit, fromTime: Long = getTimestamp()): Expiry
fromLongValue
Link copied to clipboard
@JvmStatic
fun fromLongValue(long: Long): Expiry

Creates an Expiry from a Long value. Long is assumed to be the Epoch Time in seconds, unless negative.

isExpired
Link copied to clipboard
@JvmStatic
fun isExpired(expiry: Expiry?): Boolean

Helper to determine whether an Expiry object is classed as expired. Note. FOREVER and SESSION will always be false.

Generated by Dokka
(c) Tealium 2026