public static final class AvailabilityProvider.AvailabilityHelper extends Object implements AvailabilityProvider
AvailabilityProvider.AvailabilityHelper
AVAILABLE
Constructor and Description |
---|
AvailabilityHelper() |
Modifier and Type | Method and Description |
---|---|
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.
|
void |
resetAvailable()
Resets the constant completed
AvailabilityProvider.AVAILABLE as the current state. |
void |
resetUnavailable()
Judges to reset the current available state as unavailable.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isApproximatelyAvailable, isAvailable
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–2020 The Apache Software Foundation. All rights reserved.