读书人

Hadoop中InterfaceAudience 诠注

发布时间: 2013-09-05 16:02:07 作者: rapoo

Hadoop中InterfaceAudience 注解

?

@InterfaceAudience.Public: 对所有工程和应用可用
@InterfaceAudience.LimitedPrivate: 仅限于某些特定工程,如Comomn,HDFS等
@InterfaceAudience.Private: 仅限于Hadoop

?

/**

?* Annotation to inform users of a package, class or method's intended audience.

?*/

@InterfaceAudience.Public

@InterfaceStability.Evolving

public class InterfaceAudience {

? /**

? ?* Intended for use by any project or application.

? ?*/

? @Documented public @interface Public {};

??

? /**

? ?* Intended only for the project(s) specified in the annotation.

? ?* For example, "Common", "HDFS", "MapReduce", "ZooKeeper", "HBase".

? ?*/

? @Documented public @interface LimitedPrivate {

? ? String[] value();

? };

??

? /**

? ?* Intended for use only within Hadoop itself.

? ?*/

? @Documented public @interface Private {};

?

? private InterfaceAudience() {} // Audience can't exist on its own

}

?

读书人网 >软件架构设计

热点推荐