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

Appy commented on HBASE-18878:
------------------------------

ObserverContext is IA.LimitedPrivate because CP implementations might want to 
use getEnvironment(), bypass(), complete(), getCaller(), etc.
However, they are not supposed to be using the following:
- Constructor : Only CPHost can create contexts.
- prepare(E env)  : this is for internal use only.
- createAndPrepare() : ObserverContext is created in context of a CPHost. Third 
party have use accessing constructor or these factory methods. Internally, 
these fns are used only by our tests.
Am marking these methods Private/VisibleForTesting explicitly.
But if [~Apache9] reappears after crazy long holidays, and thinks otherwise, we 
can always put an addendum.


> Use Optional instead of Nullable annotation in ObserverContext to better 
> describe that the caller may not be presented
> ----------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-18878
>                 URL: https://issues.apache.org/jira/browse/HBASE-18878
>             Project: HBase
>          Issue Type: Sub-task
>          Components: Coprocessors
>            Reporter: Duo Zhang
>            Assignee: Duo Zhang
>             Fix For: 2.0.0-alpha-4
>
>         Attachments: HBASE-18878.patch, HBASE-18878-v1.patch
>
>
> I've already done lots of Nullable to Optional change when purging the 
> interfaces for CP. This is a big one so open a separated issue for it.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to