一、zookeeper中随处可见的@InterfaceAudience标签

zookeeper中很多代码中都包含了@InterfaceAudience.Public的标签,我稍微看了一下,这个标签的定义是在audience-annotations的包里定义的,同时@IntefaceAudience还有其他的值,我百度了一下,这个标签是用来标识这个类的作用域的,整理如下:

@InterfaceAudience.Public:作用域在所有的工程和应用(Intended for use by any project or application)

@InterfaceAudience.LimitedPrivate:作用域在本项目的衍生外围项目(Intended only for the project(s) specified in the annotation.For example, "Hadoop Common", "HDFS", "MapReduce", "Zookeeper", "HBase")

@InterfaceAudience.Private:作用域在本项目中(Intended for use only within a given project)

二、zookeeper开发

待续。。。

更多参考:https://www.w3cschool.cn/zookeeper/zookeeper_overview.html

第一篇:https://my.oschina.net/u/2430231/blog/3030463

上一篇:https://my.oschina.net/u/2430231/blog/3030463

下一篇:本篇博客为zookeeper相关的最后一篇博客

04-04 09:07