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:58:20 UTC

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

Sergiy Matusevych created REEF-1545:
---------------------------------------

             Summary: 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


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)