The DataStream API supportsstate TTL, and it can be made accessible to stateful functions users.
To facilitate uses cases as described in http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Window-processing-in-Stateful-Functions-td34966.html
The proposed approach would extend the PersistedValue, PersistedTable and PersistedBuffer
with another constructor that accepts ExpireAfter object
- java time duration
- refresh on read (boolean)
(we should never return an expired entry)
In addition, we need to extend the remote function state to support state expiration.