anishshri-db commented on code in PR #45051: URL: https://github.com/apache/spark/pull/45051#discussion_r1503731606
########## sql/api/src/main/scala/org/apache/spark/sql/streaming/ExpiredTimerInfo.scala: ########## @@ -0,0 +1,45 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.spark.sql.streaming + +import java.io.Serializable + +import org.apache.spark.annotation.{Evolving, Experimental} + +/** + * Class used to provide access to expired timer's expiry time and timeout mode. These values + * are only relevant if the ExpiredTimerInfo is valid. + */ +@Experimental +@Evolving +private[sql] trait ExpiredTimerInfo extends Serializable { + /** + * Check if provided ExpiredTimerInfo is valid. + */ + def isValid(): Boolean + + /** + * Get the expired timer's expiry time as milliseconds in epoch time. + */ + def getExpiryTimeInMs(): Long + + /** + * Get the expired timer's timeout mode. + */ + def getTimeoutMode(): TimeoutMode Review Comment: But that is not available to the `StatefulProcessor` though. Do you prefer to pass the timeout mode in the `init` method instead ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org