XMLWordPrintableJSON

Details

    Description

      TTL state decorator uses original state with packed TTL and add TTL logic using time provider:

      TtlValueState<V> implements ValueState<V> {
        ValueState<TtlValue<V>> underlyingState;
        InternalTimeService timeProvider;
        V value() {
          TtlValue<V> valueWithTtl = underlyingState.get();
          // ttl logic here (e.g. update timestamp)
          return valueWithTtl.getValue();
        }
        void update() { ... underlyingState.update(valueWithTtl) ...  }
      }
      

      TTL decorators are apply to state produced by normal state binder in its TTL wrapper from FLINK-9513

      Attachments

        Issue Links

          Activity

            People

              azagrebin Andrey Zagrebin
              azagrebin Andrey Zagrebin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: