public static final class AvailabilityProvider.AvailabilityHelper extends Object implements AvailabilityProvider
AvailabilityProvider.AvailabilityHelper
AVAILABLE
Constructor and Description |
---|
AvailabilityHelper() |
Modifier and Type | Method and Description |
---|---|
CompletableFuture<?> |
and(AvailabilityProvider other) |
CompletableFuture<?> |
and(CompletableFuture<?> other) |
CompletableFuture<?> |
getAvailableFuture() |
CompletableFuture<?> |
getUnavailableToResetAvailable()
Returns the previously not completed future and resets the constant completed
AvailabilityProvider.AVAILABLE as the current state. |
CompletableFuture<?> |
getUnavailableToResetUnavailable()
Creates a new uncompleted future as the current state and returns the previous
uncompleted one.
|
CompletableFuture<?> |
or(AvailabilityProvider other) |
CompletableFuture<?> |
or(CompletableFuture<?> other) |
void |
resetAvailable()
Resets the constant completed
AvailabilityProvider.AVAILABLE as the current state. |
void |
resetUnavailable()
Judges to reset the current available state as unavailable.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
and, isApproximatelyAvailable, isAvailable, or
public CompletableFuture<?> and(CompletableFuture<?> other)
public CompletableFuture<?> and(AvailabilityProvider other)
public CompletableFuture<?> or(CompletableFuture<?> other)
public CompletableFuture<?> or(AvailabilityProvider other)
public void resetUnavailable()
public void resetAvailable()
AvailabilityProvider.AVAILABLE
as the current state.public CompletableFuture<?> getUnavailableToResetAvailable()
AvailabilityProvider.AVAILABLE
as the current state.public CompletableFuture<?> getUnavailableToResetUnavailable()
public CompletableFuture<?> getAvailableFuture()
getAvailableFuture
in interface AvailabilityProvider
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.