You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by "Sergiy Matusevych (JIRA)" <ji...@apache.org> on 2016/08/24 22:30:21 UTC

[jira] [Updated] (REEF-1544) Use typed SubscriptionHandler instead of deprecated Subscription class

     [ https://issues.apache.org/jira/browse/REEF-1544?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergiy Matusevych updated REEF-1544:
------------------------------------
    Description: Class {{Subscription}} is parameterized by token type, but in all use cases (in {{HandlerContainer}} class) it is used with type erasure, and the {{.unsubscribe()}} method checks for all possible subscription tokens manually. This is unsafe and hard to read. A safer mechanism is to use a new {{SubscriptionHandler}} class and deprecate and remove the old subscription logic.  (was: Class {{Subscription}} is parameterized by token type, but in all use cases (in {{HandlerContainer}} class) it is used with type erasure, and the {{.unsubscribe()}} method checks for all possible subscription tokens manually. This is unsafe and hard to read. A safer mechanism is to use a new {{Subscriptionhandler}} class and deprecate and remove the old subscription logic.)

> Use typed SubscriptionHandler instead of deprecated Subscription class
> ----------------------------------------------------------------------
>
>                 Key: REEF-1544
>                 URL: https://issues.apache.org/jira/browse/REEF-1544
>             Project: REEF
>          Issue Type: Improvement
>          Components: REEF-Common
>            Reporter: Sergiy Matusevych
>            Assignee: Sergiy Matusevych
>            Priority: Minor
>              Labels: deprecation
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Class {{Subscription}} is parameterized by token type, but in all use cases (in {{HandlerContainer}} class) it is used with type erasure, and the {{.unsubscribe()}} method checks for all possible subscription tokens manually. This is unsafe and hard to read. A safer mechanism is to use a new {{SubscriptionHandler}} class and deprecate and remove the old subscription logic.



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