Class OAuthStoreReadResult.Available
java.lang.Object
com.revetsec.oauth.server.OAuthStoreReadResult.Available
- All Implemented Interfaces:
OAuthStoreReadResult
- Enclosing interface:
OAuthStoreReadResult
@Immutable
@CheckReturnValue
public static final class OAuthStoreReadResult.Available
extends Object
implements OAuthStoreReadResult
The exact requested address, entry/absence and metadata from one atomic observation.
- Since:
- 1.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface OAuthStoreReadResult
OAuthStoreReadResult.Available, OAuthStoreReadResult.Fenced, OAuthStoreReadResult.UnavailableModifier and TypeInterfaceDescriptionstatic final classThe exact requested address, entry/absence and metadata from one atomic observation.static final classThe requested recovery/data incarnation cannot be served.static final classNo coherent authoritative observation could be established. -
Method Summary
Modifier and TypeMethodDescriptionfromObservation(@NonNull OAuthStoreKey key, @Nullable OAuthStoreEntry entry, @NonNull StoreTimeObservation timeObservation) Retains one exact coherent backend observation without authenticating its bytes.getEntry()Returns the entry or confirmed absence.getKey()Returns the exact requested address.Returns coherent authority metadata, which need not include healthy time.toString()Redacts every entry, identity and time.
-
Method Details
-
fromObservation
public static @NonNull OAuthStoreReadResult.Available fromObservation(@NonNull OAuthStoreKey key, @Nullable OAuthStoreEntry entry, @NonNull StoreTimeObservation timeObservation) Retains one exact coherent backend observation without authenticating its bytes.- Parameters:
key- the requested addressentry- the exact entry, or null for confirmed absencetimeObservation- coherent authority/admission metadata- Returns:
- the available observation
- Throws:
NullPointerException- if key or metadata is nullIllegalArgumentException- if entry has another address- Since:
- 1.0.0
-
getKey
Returns the exact requested address.- Returns:
- the address
- Since:
- 1.0.0
-
getEntry
Returns the entry or confirmed absence.- Returns:
- the optional entry
- Since:
- 1.0.0
-
getTimeObservation
Returns coherent authority metadata, which need not include healthy time.- Returns:
- the observation
- Since:
- 1.0.0
-
toString
-