class ListStateImplWithTTL[S] extends OneToManyTTLState with ListState[S]
Class that provides a concrete implementation for a list state state associated with state variables (with ttl expiration support) used in the streaming transformWithState operator.
- S
- data type of object that will be stored
- Alphabetic
- By Inheritance
- ListStateImplWithTTL
- ListState
- Serializable
- OneToManyTTLState
- TTLState
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ListStateImplWithTTL(store: StateStore, stateName: String, keyExprEnc: ExpressionEncoder[Any], valEncoder: ExpressionEncoder[Any], ttlConfig: TTLConfig, batchTimestampMs: Long, metrics: Map[String, SQLMetric])
- store
- reference to the StateStore instance to be used for storing state
- stateName
- name of logical state partition
- keyExprEnc
- Spark SQL encoder for key
- valEncoder
- Spark SQL encoder for value
- ttlConfig
- TTL configuration for values stored in this state
- batchTimestampMs
- current batch processing timestamp.
- metrics
- metrics to be updated as part of stateful processing
Type Members
- case class ValueExpirationResult(numValuesExpired: Long, newMinExpirationMs: Option[Long]) extends Product with Serializable
- Definition Classes
- OneToManyTTLState
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def appendList(newState: Array[S]): Unit
Append an entire list to the existing value.
Append an entire list to the existing value.
- Definition Classes
- ListStateImplWithTTL → ListState
- def appendValue(newState: S): Unit
Append an entry to the list.
Append an entry to the list.
- Definition Classes
- ListStateImplWithTTL → ListState
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clear(): Unit
Remove this state.
Remove this state.
- Definition Classes
- ListStateImplWithTTL → ListState
- def clearExpiredValues(elementKey: UnsafeRow): ValueExpirationResult
Loops through all the values associated with the grouping key, and removes the expired elements from the list.
Loops through all the values associated with the grouping key, and removes the expired elements from the list.
- elementKey
grouping key for which cleanup should be performed.
- Definition Classes
- ListStateImplWithTTL → OneToManyTTLState
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def exists(): Boolean
Whether state exists or not.
Whether state exists or not.
- Definition Classes
- ListStateImplWithTTL → ListState
- def get(): Iterator[S]
Get the state value if it exists.
Get the state value if it exists. If the state does not exist in state store, an empty iterator is returned.
- Definition Classes
- ListStateImplWithTTL → ListState
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- def put(newState: Array[S]): Unit
Update the value of the list.
Update the value of the list.
- Definition Classes
- ListStateImplWithTTL → ListState
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)