public class DefaultRequestContext extends Object implements RequestContext
RequestContext that is NOT thread-safe.| Constructor and Description |
|---|
DefaultRequestContext(String partitionId) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
computeIfAbsent(Object key,
Supplier<T> supplier)
Returns the value associated with the specified key, or computes it atomically using the provided
supplier.
|
<T> Optional<T> |
get(Object key)
Returns the value associated with the specified key, or
Optional.empty(). |
String |
partitionIdentifier()
Returns the partition identifier
|
public DefaultRequestContext(String partitionId)
@Nonnull public String partitionIdentifier()
RequestContextpartitionIdentifier in interface RequestContext@Nonnull public <T> T computeIfAbsent(Object key, Supplier<T> supplier)
RequestContextcomputeIfAbsent in interface RequestContextT - the return typekey - the key to retrieve the value under.supplier - the supplier to create the missing value@Nonnull public <T> Optional<T> get(Object key)
RequestContextOptional.empty().get in interface RequestContextCopyright © 2015 Atlassian. All rights reserved.