You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by "Markus Weimer (JIRA)" <ji...@apache.org> on 2016/08/27 00:15:20 UTC

[jira] [Resolved] (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 ]

Markus Weimer resolved REEF-1545.
---------------------------------
       Resolution: Fixed
    Fix Version/s: 0.16

Resolved via [#1108|https://github.com/apache/reef/pull/1108]

> Refactor HandlerContainer to improve safety, readability, and performance
> -------------------------------------------------------------------------
>
>                 Key: REEF-1545
>                 URL: https://issues.apache.org/jira/browse/REEF-1545
>             Project: REEF
>          Issue Type: Improvement
>          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)