[ 
https://issues.apache.org/jira/browse/FLINK-5023?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15643720#comment-15643720
 ] 

Aljoscha Krettek commented on FLINK-5023:
-----------------------------------------

I also thought about this. We shouldn't remove the old methods, though, so as 
to not break existing code.

What I wanted to do is add a new interface {{ReadableState<T>}} like this:

{code}
interface ReadableState<T> extends State {
  T get();
}
{code}

What do you think?

> Add get() method in State interface
> -----------------------------------
>
>                 Key: FLINK-5023
>                 URL: https://issues.apache.org/jira/browse/FLINK-5023
>             Project: Flink
>          Issue Type: Improvement
>          Components: State Backends, Checkpointing
>            Reporter: Xiaogang Shi
>
> Currently, the only method provided by the State interface is `clear()`. I 
> think we should provide another method called `get()` to return the 
> structured value (e.g., value, list, or map) under the current key. 
> In fact, the functionality of `get()` has already been implemented in all 
> types of states: e.g., `value()` in ValueState and `get()` in ListState. The 
> modification to the interface can better abstract these states.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to