public final class StateServiceImpl extends java.lang.Object implements StateService
| Constructor and Description |
|---|
StateServiceImpl(ProductSyncOptions syncOptions) |
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.CompletionStage<java.util.Optional<java.lang.String>> |
fetchCachedStateId(java.lang.String key)
Given a
key, this method first checks if a cached map of State keys -> ids contains the key. |
public StateServiceImpl(@Nonnull
ProductSyncOptions syncOptions)
@Nonnull
public java.util.concurrent.CompletionStage<java.util.Optional<java.lang.String>> fetchCachedStateId(@Nullable
java.lang.String key)
StateServicekey, this method first checks if a cached map of State keys -> ids contains the key.
If not, it returns a completed future that contains an Optional that contains what this key maps to in
the cache. If the cache doesn't contain the key; this method attempts to fetch the id of the key from the CTP
project, caches it and returns a CompletionStage<Optional<String>>
in which the result of it's completion could contain an
Optional with the id inside of it or an empty Optional if no State was
found in the CTP project with this key.fetchCachedStateId in interface StateServicekey - the key by which a State id should be fetched from the CTP
project.CompletionStage<Optional<String>> in which the result of its
completion could contain an Optional with the id inside of it or an empty Optional if no
State was found in the CTP project with this key.