001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018package org.apache.hadoop.classification; 019 020import java.lang.annotation.Documented; 021import java.lang.annotation.Retention; 022import java.lang.annotation.RetentionPolicy; 023 024import org.apache.hadoop.classification.InterfaceAudience.LimitedPrivate; 025import org.apache.hadoop.classification.InterfaceAudience.Private; 026import org.apache.hadoop.classification.InterfaceAudience.Public; 027 028/** 029 * Annotation to inform users of how much to rely on a particular package, 030 * class or method not changing over time. Currently the stability can be 031 * {@link Stable}, {@link Evolving} or {@link Unstable}. <br> 032 * 033 * <ul><li>All classes that are annotated with {@link Public} or 034 * {@link LimitedPrivate} must have InterfaceStability annotation. </li> 035 * <li>Classes that are {@link Private} are to be considered unstable unless 036 * a different InterfaceStability annotation states otherwise.</li> 037 * <li>Incompatible changes must not be made to classes marked as stable.</li> 038 * </ul> 039 */ 040@InterfaceAudience.Public 041@InterfaceStability.Evolving 042public class InterfaceStability { 043 /** 044 * Can evolve while retaining compatibility for minor release boundaries.; 045 * can break compatibility only at major release (ie. at m.0). 046 */ 047 @Documented 048 @Retention(RetentionPolicy.RUNTIME) 049 public @interface Stable {}; 050 051 /** 052 * Evolving, but can break compatibility at minor release (i.e. m.x) 053 */ 054 @Documented 055 @Retention(RetentionPolicy.RUNTIME) 056 public @interface Evolving {}; 057 058 /** 059 * No guarantee is provided as to reliability or stability across any 060 * level of release granularity. 061 */ 062 @Documented 063 @Retention(RetentionPolicy.RUNTIME) 064 public @interface Unstable {}; 065}