Skip to content

Commit 24d11eb

Browse files
Move Stable API to Unstable (#3016)
* Move Stable and Maintained to Unstable * Mark relational APIs as experimental * Fix javadoc and remove MAINTAINED * Add fdb-extensions to relational-api * More gradle fixes * Restore final
1 parent 13fdc2f commit 24d11eb

File tree

551 files changed

+1274
-236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

551 files changed

+1274
-236
lines changed

docs/Versioning.md

-3
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,12 @@ Classes and methods annotations using `@API` determine when they can be changed
7575

7676
* `STABLE` will not change until the major version is incremented. At that time, they may also change status to something less stable.
7777

78-
* `MAINTAINED` will not change until the minor version is incremented. At that time, only the status changes to `UNSTABLE` or `DEPRECATED`. This indicates that in the *next* minor version they will change / be removed.
79-
8078
* `UNSTABLE` can change in a minor release without other advance notice.
8179

8280
* `DEPRECATED` can be removed in a minor release without other advance notice.
8381

8482
* `EXPERIMENTAL` can change / be removed in any build without notice.
8583

86-
8784
## Creating a Patch Branch
8885

8986
* Patch branches should be named `fdb-record-layer-a.b.c` after the build from which they are created.

fdb-extensions/src/main/java/com/apple/foundationdb/FDBError.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* FDB error codes (from https://apple.github.io/foundationdb/api-error-codes.html) and handy methods to
3131
* interpret them.
3232
*/
33-
@API(API.Status.MAINTAINED)
33+
@API(API.Status.UNSTABLE)
3434
public enum FDBError {
3535
SUCCESS(0),
3636
OPERATION_FAILED(1000),

fdb-extensions/src/main/java/com/apple/foundationdb/annotation/API.java

+1-11
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,10 @@ enum Status {
7979

8080
/**
8181
* Used by APIs that may change in the next minor release without prior notice. In contrast to those marked
82-
* {@code EXPERIMENTAL}, this API shall not be changed or be removed until the next minor release. In contrast
83-
* to {@code MAINTAINED} code, there may not be advance notification (such as deprecation) before the API is
84-
* changed or removed. May become less stable in the next minor release.
82+
* {@code EXPERIMENTAL}, this API shall not be changed or be removed until the next minor release.
8583
*/
8684
UNSTABLE,
8785

88-
/**
89-
* Used for APIs that shall not be changed or removed in the next minor release. May become less stable in
90-
* the next minor release. Generally, if this API is to be changed or removed, the status changes first to
91-
* a lower stability (such as {@code UNSTABLE} or {@code DEPRECATED}) in the next minor release. This status
92-
* change serves as a notification of the potential upcoming change.
93-
*/
94-
MAINTAINED,
95-
9686
/**
9787
* Used for APIs that shall not be changed in a backwards-incompatible way or removed until the next major release.
9888
* May become less stable in the next major release.

fdb-extensions/src/main/java/com/apple/foundationdb/annotation/SpotBugsSuppressWarnings.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*
2626
* Avoids introducing another transitive dependency.
2727
*/
28-
@API(API.Status.STABLE)
28+
@API(API.Status.UNSTABLE)
2929
public @interface SpotBugsSuppressWarnings {
3030
String[] value();
3131
String justification() default "";

fdb-extensions/src/main/java/com/apple/foundationdb/async/AsyncPeekIterator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
*
4242
* @param <T> type of elements returned by the scan
4343
*/
44-
@API(API.Status.STABLE)
44+
@API(API.Status.UNSTABLE)
4545
public interface AsyncPeekIterator<T> extends AsyncIterator<T> {
4646
/**
4747
* Get the next item of the scan without advancing it.

fdb-extensions/src/main/java/com/apple/foundationdb/async/MoreAsyncUtil.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ public static <U, T> CompletableFuture<U> reduce(@Nonnull Executor executor,
796796
* @param future the future to check for normal completion
797797
* @return whether the future has completed without exception
798798
*/
799-
@API(API.Status.MAINTAINED)
799+
@API(API.Status.UNSTABLE)
800800
public static boolean isCompletedNormally(@Nonnull CompletableFuture<?> future) {
801801
return future.isDone() && !future.isCompletedExceptionally();
802802
}
@@ -831,7 +831,7 @@ public static ScheduledExecutorService getDefaultScheduledExecutor() {
831831
* @return a future that will be ready after the given delay
832832
* @see #delayedFuture(long, TimeUnit, ScheduledExecutorService)
833833
*/
834-
@API(API.Status.MAINTAINED)
834+
@API(API.Status.UNSTABLE)
835835
@Nonnull
836836
public static CompletableFuture<Void> delayedFuture(long delay, @Nonnull TimeUnit unit) {
837837
return delayedFuture(delay, unit, getDefaultScheduledExecutor());
@@ -850,7 +850,7 @@ public static CompletableFuture<Void> delayedFuture(long delay, @Nonnull TimeUni
850850
* @param scheduledExecutor executor service used to complete the returned future and run any same-thread callbacks
851851
* @return a {@link CompletableFuture} that will fire after the given delay
852852
*/
853-
@API(API.Status.MAINTAINED)
853+
@API(API.Status.UNSTABLE)
854854
@Nonnull
855855
public static CompletableFuture<Void> delayedFuture(long delay, @Nonnull TimeUnit unit, @Nonnull ScheduledExecutorService scheduledExecutor) {
856856
if (delay <= 0) {
@@ -895,7 +895,7 @@ public static <T> CompletableFuture<T> getWithDeadline(long deadlineTimeMillis,
895895
* Close the given iterator, or at least cancel it.
896896
* @param iterator iterator to close
897897
*/
898-
@API(API.Status.MAINTAINED)
898+
@API(API.Status.UNSTABLE)
899899
public static void closeIterator(@Nonnull Iterator<?> iterator) {
900900
if (iterator instanceof CloseableAsyncIterator) {
901901
((CloseableAsyncIterator<?>)iterator).close();

fdb-extensions/src/main/java/com/apple/foundationdb/async/RangeSet.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
* append only set that can be used to keep track of the progress that that job is making.
5151
* </p>
5252
*/
53-
@API(API.Status.MAINTAINED)
53+
@API(API.Status.UNSTABLE)
5454
public class RangeSet {
5555
@Nonnull private Subspace subspace;
5656
@Nonnull private static final byte[] FIRST_KEY = { (byte)0x00 };

fdb-extensions/src/main/java/com/apple/foundationdb/async/RankedSet.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
* and the value is the number of elements between this key and the previous key at the same level, encoded as a little-endian long.
7676
* </p>
7777
*/
78-
@API(API.Status.MAINTAINED)
78+
@API(API.Status.UNSTABLE)
7979
public class RankedSet {
8080
/**
8181
* Hash using the JDK's default byte array hash.

fdb-extensions/src/main/java/com/apple/foundationdb/tuple/ByteArrayUtil2.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public static String toHexString(@Nullable byte[] bytes) {
7777
* @return a hex representation of {@code bytes}
7878
* @see ByteArrayUtil#printable(byte[])
7979
*/
80-
@API(API.Status.MAINTAINED)
80+
@API(API.Status.UNSTABLE)
8181
@Nullable
8282
public static String loggable(@Nullable byte[] bytes) {
8383
if (bytes == null) {
@@ -111,7 +111,7 @@ public static String loggable(@Nullable byte[] bytes) {
111111
* returned by {@link ByteArrayUtil#printable(byte[])}
112112
* @return a byte array parsed from {@code loggedBytes}
113113
*/
114-
@API(API.Status.MAINTAINED)
114+
@API(API.Status.UNSTABLE)
115115
@Nullable
116116
public static byte[] unprint(@Nullable String loggedBytes) {
117117
if (loggedBytes == null) {

fdb-extensions/src/main/java/com/apple/foundationdb/tuple/TupleHelpers.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public static Tuple subTuple(@Nonnull Tuple src, int start, int end) {
6161
* a value less than {@code 0} if {@code t1} would sort before {@code t2}
6262
* a value greater than {@code 0} if {@code t1} would sort after {@code t2}
6363
*/
64-
@API(API.Status.MAINTAINED)
64+
@API(API.Status.UNSTABLE)
6565
public static int compare(@Nonnull Tuple t1, @Nonnull Tuple t2) {
6666
final int t1Len = t1.size();
6767
final int t2Len = t2.size();

fdb-extensions/src/main/java/com/apple/foundationdb/util/LoggableException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* be logged in a way that better supports searching later.
3232
*/
3333
@SuppressWarnings("serial")
34-
@API(API.Status.MAINTAINED)
34+
@API(API.Status.UNSTABLE)
3535
public class LoggableException extends RuntimeException implements LoggableKeysAndValues<LoggableException> {
3636
@Nonnull private final LoggableKeysAndValuesImpl loggableKeysAndValuesImpl = new LoggableKeysAndValuesImpl();
3737

fdb-extensions/src/main/java/com/apple/foundationdb/util/LoggableKeysAndValuesImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* Provides a default implementation of {@link LoggableKeysAndValues}.
3333
*/
3434
@SuppressWarnings("serial")
35-
@API(API.Status.MAINTAINED)
35+
@API(API.Status.UNSTABLE)
3636
public class LoggableKeysAndValuesImpl implements LoggableKeysAndValues<LoggableKeysAndValuesImpl> {
3737
private static final Object[] EMPTY_LOG_INFO = new Object[0];
3838
@Nullable private Map<String, Object> logInfo;

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/Bindings.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
* A binding map can also have a parent from which values are taken if they are absent in the child.
3939
* </p>
4040
*/
41-
@API(API.Status.MAINTAINED)
41+
@API(API.Status.UNSTABLE)
4242
public class Bindings {
4343

4444
/**

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/EndpointType.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* There is also a special type for the range of values where a string element of a {@code Tuple} begins with a given string.
3333
* </p>
3434
*/
35-
@API(API.Status.MAINTAINED)
35+
@API(API.Status.UNSTABLE)
3636
public enum EndpointType {
3737
TREE_START,
3838
TREE_END,

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/EvaluationContext.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* @see com.apple.foundationdb.record.query.expressions.QueryComponent#eval
3838
* @see com.apple.foundationdb.record.query.plan.plans.RecordQueryPlan#execute
3939
*/
40-
@API(API.Status.MAINTAINED)
40+
@API(API.Status.UNSTABLE)
4141
public class EvaluationContext {
4242
@Nonnull
4343
private final Bindings bindings;

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/EvaluationContextBuilder.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* context.childBuilder().setBinding("x", x).build()
3434
* </code></pre>
3535
*/
36-
@API(API.Status.MAINTAINED)
36+
@API(API.Status.UNSTABLE)
3737
public class EvaluationContextBuilder {
3838
@Nonnull
3939
protected final Bindings.Builder bindings;

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/ExecuteProperties.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
* <li>limit on number of key-value pairs scanned</li>
3838
* </ul>
3939
*/
40-
@API(API.Status.MAINTAINED)
40+
@API(API.Status.UNSTABLE)
4141
public class ExecuteProperties {
4242
/**
4343
* A constant representing that no time limit is set.

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/ExecuteState.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
* In general, the state object should be constructed by as part of a "root" <code>ExecuteProperties</code> rather than
3434
* directly by the client.
3535
*/
36-
@API(API.Status.MAINTAINED)
36+
@API(API.Status.UNSTABLE)
3737
public class ExecuteState {
3838

3939
/**

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/FunctionNames.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
/**
2626
* Names of core-supported query functions.
2727
*/
28-
@API(API.Status.MAINTAINED)
28+
@API(API.Status.UNSTABLE)
2929
public class FunctionNames {
3030

3131
/* Aggregate functions */

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/IndexEntry.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
* Further, if the key and value were produced by applying an index key expression to a record, this will carry
3737
* around additional information about the nulls contained in the expression.
3838
*/
39-
@API(API.Status.MAINTAINED)
39+
@API(API.Status.UNSTABLE)
4040
public class IndexEntry {
4141
private static final NullStandin[] NO_NULLS = new NullStandin[0];
4242

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/IndexScanType.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
*
3535
* @see com.apple.foundationdb.record.provider.foundationdb.IndexMaintainer#scan
3636
*/
37-
@API(API.Status.MAINTAINED)
37+
@API(API.Status.UNSTABLE)
3838
public class IndexScanType implements PlanHashable, PlanSerializable {
3939
@Nonnull
4040
public static final IndexScanType BY_VALUE = new IndexScanType("BY_VALUE");

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/IndexState.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* These states might differ between record stores that have
3030
* otherwise identical meta-data.
3131
*/
32-
@API(API.Status.MAINTAINED)
32+
@API(API.Status.UNSTABLE)
3333
public enum IndexState {
3434
/**
3535
* This is the default state for an index. It is

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/IsolationLevel.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
*
2828
* @see ExecuteProperties#getIsolationLevel
2929
*/
30-
@API(API.Status.MAINTAINED)
30+
@API(API.Status.UNSTABLE)
3131
public enum IsolationLevel {
3232

33-
@API(API.Status.STABLE)
33+
@API(API.Status.UNSTABLE)
3434
SNAPSHOT(true),
3535

36-
@API(API.Status.STABLE)
36+
@API(API.Status.UNSTABLE)
3737
SERIALIZABLE(false)
3838
;
3939

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/KeyRange.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
/**
2929
* A range within a subspace specified by two byte value endpoints.
3030
*/
31-
@API(API.Status.MAINTAINED)
31+
@API(API.Status.UNSTABLE)
3232
public class KeyRange {
3333
@Nonnull
3434
private final byte[] lowKey;

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/LoggableTimeoutException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* to provide context-specific details that can be logged in a way that better supports troubleshooting later.
3636
*/
3737
@SuppressWarnings("serial")
38-
@API(API.Status.MAINTAINED)
38+
@API(API.Status.UNSTABLE)
3939
public class LoggableTimeoutException extends TimeoutException implements LoggableKeysAndValues<LoggableTimeoutException> {
4040
@Nonnull
4141
private final LoggableKeysAndValuesImpl loggableKeysAndValuesImpl = new LoggableKeysAndValuesImpl();

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/PipelineOperation.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* @see com.apple.foundationdb.record.provider.foundationdb.FDBRecordStoreBase.PipelineSizer
3333
* @see RecordCursor#mapPipelined
3434
*/
35-
@API(API.Status.MAINTAINED)
35+
@API(API.Status.UNSTABLE)
3636
public class PipelineOperation {
3737
@Nonnull
3838
public static final PipelineOperation INDEX_TO_RECORD = new PipelineOperation("INDEX_TO_RECORD");

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/RecordCoreArgumentException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
/**
2828
* Functional equivalent of <code>IllegalArgumentException</code>.
2929
*/
30-
@API(API.Status.STABLE)
30+
@API(API.Status.UNSTABLE)
3131
public class RecordCoreArgumentException extends RecordCoreException {
3232
private static final long serialVersionUID = 1;
3333

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/RecordCoreException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
/**
3030
* An exception thrown by the core of the Record Layer.
3131
*/
32-
@API(API.Status.STABLE)
32+
@API(API.Status.UNSTABLE)
3333
@SuppressWarnings("serial")
3434
public class RecordCoreException extends LoggableException {
3535
public RecordCoreException(@Nonnull String msg, @Nullable Object ... keyValues) {

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/RecordCoreInterruptedException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* NOTE: When catching an {@code InterruptedException} and rethrowing as this wrapping exception, Java best practice
3131
* is to call {@code Thread.currentThread().interrupt()} so that the interrupt is not lost.
3232
*/
33-
@API(API.Status.STABLE)
33+
@API(API.Status.UNSTABLE)
3434
public class RecordCoreInterruptedException extends RecordCoreException {
3535
private static final long serialVersionUID = 1;
3636

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/RecordCoreRetriableTransactionException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
/**
2929
* An exception from transaction processing that ought to be retried.
3030
*/
31-
@API(API.Status.STABLE)
31+
@API(API.Status.UNSTABLE)
3232
@SuppressWarnings("serial")
3333
public class RecordCoreRetriableTransactionException extends RecordCoreStorageException {
3434
public RecordCoreRetriableTransactionException(@Nonnull String msg) {

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/RecordCoreStorageException.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
/**
2929
* Exceptions due to problems with the state of or connection to a particular record store.
3030
*/
31-
@API(API.Status.STABLE)
31+
@API(API.Status.UNSTABLE)
3232
@SuppressWarnings("serial")
3333
public class RecordCoreStorageException extends RecordCoreException {
3434
public RecordCoreStorageException(@Nonnull String msg) {

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/RecordCursor.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
*
101101
* @param <T> the type of elements of the cursor
102102
*/
103-
@API(API.Status.STABLE)
103+
@API(API.Status.UNSTABLE)
104104
public interface RecordCursor<T> extends AutoCloseable {
105105
/**
106106
* The reason that {@link RecordCursorResult#hasNext()} returned <code>false</code>.
@@ -254,7 +254,7 @@ default RecordCursorResult<T> getNext() {
254254
* @return a view of this cursor as an {@link RecordCursorIterator}
255255
*/
256256
@Nonnull
257-
@API(API.Status.STABLE)
257+
@API(API.Status.UNSTABLE)
258258
default RecordCursorIterator<T> asIterator() {
259259
return new RecordCursorIterator<>(this);
260260
}

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/RecordCursorContinuation.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
* {@link com.apple.foundationdb.record.provider.foundationdb.KeyValueCursor}'s continuation.
5252
* </p>
5353
*/
54-
@API(API.Status.STABLE)
54+
@API(API.Status.UNSTABLE)
5555
public interface RecordCursorContinuation {
5656
/**
5757
* Serialize this continuation to a byte array. This method must always return the same array contents (but not

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/RecordCursorIterator.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
*
4040
* @param <T> the type of elements of the cursor
4141
*/
42-
@API(API.Status.STABLE)
42+
@API(API.Status.UNSTABLE)
4343
public class RecordCursorIterator<T> implements AsyncIterator<T>, AutoCloseable {
4444
@Nonnull
4545
private final RecordCursor<T> cursor;

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/RecordCursorResult.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
*
6161
* @param <T> the type of result produced when the result includes a value
6262
*/
63-
@API(API.Status.STABLE)
63+
@API(API.Status.UNSTABLE)
6464
public class RecordCursorResult<T> {
6565

6666
@Nonnull

fdb-record-layer-core/src/main/java/com/apple/foundationdb/record/RecordFunction.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* A function to be applied to a record as part of query execution.
3131
* @param <T> the result type of the function
3232
*/
33-
@API(API.Status.STABLE)
33+
@API(API.Status.UNSTABLE)
3434
public abstract class RecordFunction<T> implements PlanHashable, QueryHashable {
3535

3636
@Nonnull

0 commit comments

Comments
 (0)