Add Empty.{completed,immediate}Future() 89/110089/2
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 30 Jan 2024 01:13:27 +0000 (02:13 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 30 Jan 2024 13:38:35 +0000 (14:38 +0100)
commitd17a3554514d8a3439e60c2a7eda88ef712dbeac
treedce89719acf3dd52dc2f800a2e571b07318fc7cb
parent9f6f5febfd72f9ea7fa8778f9a495372bd61e518
Add Empty.{completed,immediate}Future()

A number of downstream users are using Empty as a result of a future
which should only report empty success without relying on
java.lang.Void.

Since we are not playing favorites, let's expose two versions in keeping
with Java/Guava naming conventions:
- completedFuture() is the CompletionStage
- immediateFuture() is the ListenableFuture

JIRA: YANGTOOLS-1566
Change-Id: I5897ef561f562440e5d81fa7b0711e139dc6d6ee
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
common/yang-common/src/main/java/org/opendaylight/yangtools/yang/common/Empty.java