|
| 1 | +/* |
| 2 | + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one |
| 3 | + * or more contributor license agreements. Licensed under the "Elastic License |
| 4 | + * 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side |
| 5 | + * Public License v 1"; you may not use this file except in compliance with, at |
| 6 | + * your election, the "Elastic License 2.0", the "GNU Affero General Public |
| 7 | + * License v3.0 only", or the "Server Side Public License, v 1". |
| 8 | + */ |
| 9 | + |
| 10 | +package org.elasticsearch.core; |
| 11 | + |
| 12 | +import java.lang.annotation.ElementType; |
| 13 | +import java.lang.annotation.Retention; |
| 14 | +import java.lang.annotation.RetentionPolicy; |
| 15 | +import java.lang.annotation.Target; |
| 16 | + |
| 17 | +/** |
| 18 | + * Annotation to identify a block of code (a whole class, a method, a field, or a local variable) that is intentionally not fully |
| 19 | + * project-aware because it's not intended to be used in a serverless environment. Some features are unavailable in serverless and are |
| 20 | + * thus not worth the investment to make fully project-aware. This annotation makes it easier to identify blocks of code that require |
| 21 | + * attention in case those features are revisited from a multi-project POV. |
| 22 | + */ |
| 23 | +@Retention(RetentionPolicy.SOURCE) |
| 24 | +@Target( |
| 25 | + { ElementType.LOCAL_VARIABLE, ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.METHOD, ElementType.TYPE, ElementType.MODULE } |
| 26 | +) |
| 27 | +public @interface NotMultiProjectCapable { |
| 28 | + |
| 29 | + /** |
| 30 | + * Some explanation on why the block of code would not work in a multi-project context and/or what would need to be done to make it |
| 31 | + * properly project-aware. |
| 32 | + */ |
| 33 | + String description() default ""; |
| 34 | +} |
0 commit comments