Class TTLConfig

Object
org.apache.spark.sql.streaming.TTLConfig
All Implemented Interfaces:
Serializable, scala.Equals, scala.Product

public class TTLConfig extends Object implements scala.Product, Serializable
TTL Configuration for state variable. State values will not be returned past ttlDuration, and will be eventually removed from the state store. Any state update resets the ttl to current processing time plus ttlDuration.

Passing a TTL duration of zero will disable the TTL for the state variable. Users can also use the helper method TTLConfig.NONE in Scala or TTLConfig.NONE() in Java to disable TTL for the state variable.

param: ttlDuration time to live duration for state stored in the state variable.

See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    TTLConfig(Duration ttlDuration)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static TTLConfig
    Helper method to create a TTLConfig with expiry duration as Zero
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface scala.Equals

    canEqual, equals

    Methods inherited from interface scala.Product

    productArity, productElement, productElementName, productElementNames, productIterator, productPrefix
  • Constructor Details

    • TTLConfig

      public TTLConfig(Duration ttlDuration)
  • Method Details

    • NONE

      public static TTLConfig NONE()
      Helper method to create a TTLConfig with expiry duration as Zero
      Returns:
      \- TTLConfig with expiry duration as Zero
    • ttlDuration

      public Duration ttlDuration()