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/09/12 19:57:20 UTC

[jira] [Updated] (REEF-1545) Refactor HandlerContainer to improve safety, readability, and performance

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

Sergiy Matusevych updated REEF-1545:
------------------------------------
    Issue Type: Sub-task  (was: Improvement)
        Parent: REEF-1561

> Refactor HandlerContainer to improve safety, readability, and performance
> -------------------------------------------------------------------------
>
>                 Key: REEF-1545
>                 URL: https://issues.apache.org/jira/browse/REEF-1545
>             Project: REEF
>          Issue Type: Sub-task
>          Components: REEF-Common
>            Reporter: Sergiy Matusevych
>            Assignee: Sergiy Matusevych
>              Labels: javadoc, performance, race-condition, refactor
>             Fix For: 0.16
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Current implementation of {{HandlerContainer}} class has several issues:
>   * It uses the {{Subscription}} class in untyped fashion, ignoring its type parameter.
>   * {{.unsubscribe()}} method manually checks for all possible types of the subscription token, even though it is always known at the subscription time. This is error-prone and hard to read.
>   * When registering handlers, we use a sequence of two operations - {{Map.putIfAbsent()}} and {{.replace()}}, instead of just {{.put()}}. It also introduces a potential race condition, since the map is synchronized.



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