public class RequestState extends Object
| Constructor and Description |
|---|
RequestState(Globals globals,
UrlBuildingStrategy urlBuildingStrategy) |
RequestState(Globals globals,
UrlBuildingStrategy urlBuildingStrategy,
boolean autoIncludeFrontendRuntime) |
RequestState(RequestState other) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearIncludedAndUpdateExcluded(ResourcePhase resourcePhase,
Set<String> excludedResolved)
Called after generating urls, to clear current state and remember already included resources.
|
RequestState |
deepClone() |
BigPipe |
getBigPipe() |
long |
getBigPipeDeadline() |
LinkedHashSet<String> |
getExcluded()
Deprecated.
|
Set<String> |
getExcludedData() |
Set<String> |
getExcludedResolved()
Most UI code is not written to be idempotent, so content for each
Requestable
should only ever be served to the UI once. |
Globals |
getGlobals()
Deprecated.
since 5.0.0. There is no replacement. Don't use god objects.
|
LinkedHashSet<String> |
getIncluded()
Deprecated.
|
LinkedHashSet<String> |
getIncluded(ResourcePhase phaseType)
Deprecated.
|
LinkedHashMap<String,com.atlassian.json.marshal.Jsonable> |
getIncludedData() |
LinkedHashMap<String,com.atlassian.json.marshal.Jsonable> |
getIncludedData(ResourcePhase resourcePhase) |
RawRequest |
getRawRequest() |
RequestCache |
getRequestCache() |
Snapshot |
getSnapshot()
Get all bundles.
|
SuperbatchConfiguration |
getSuperbatchConfiguration() |
Optional<DefaultWebResourceSet> |
getSyncResourceSet()
Deprecated.
since 5.6.0. Check sync resources via
getRawRequest() with ResourcePhase.INLINE. |
UrlBuildingStrategy |
getUrlStrategy() |
boolean |
isAutoIncludeFrontendRuntimeEnabled()
Whether to automatically include frontend runtime modules (e.g., WRM.require, WRM.data) automatically
when the feature is used.
|
boolean |
isSyncbatchEnabled() |
void |
markSyncResourcesAsWritten()
Deprecated.
since 5.6.0. Covered by existing excludedResolved mechanism and
ResourcePhase.INLINE. |
void |
setBigPipeDeadline(long deadline) |
void |
setSyncbatchEnabled(boolean enabled) |
void |
setSyncResourceSet(DefaultWebResourceSet set)
Deprecated.
since 5.6.0. Use
setSyncbatchEnabled(boolean) instead. |
String |
toString() |
public RequestState(Globals globals, UrlBuildingStrategy urlBuildingStrategy)
public RequestState(Globals globals, UrlBuildingStrategy urlBuildingStrategy, boolean autoIncludeFrontendRuntime)
public RequestState(RequestState other)
public void clearIncludedAndUpdateExcluded(@Nonnull ResourcePhase resourcePhase, @Nonnull Set<String> excludedResolved)
@Nonnull public RequestState deepClone()
public long getBigPipeDeadline()
public void setBigPipeDeadline(long deadline)
@Nonnull public RequestCache getRequestCache()
@Nonnull @Deprecated public LinkedHashSet<String> getExcluded()
RawRequest.getExcludedAsLooseType()@Nonnull @Deprecated public LinkedHashSet<String> getIncluded()
RawRequest.getIncludedAsLooseType()@Nonnull @Deprecated public LinkedHashSet<String> getIncluded(@Nonnull ResourcePhase phaseType)
RawRequest.getIncludedAsLooseType()@Nonnull public LinkedHashMap<String,com.atlassian.json.marshal.Jsonable> getIncludedData()
@Nonnull public LinkedHashMap<String,com.atlassian.json.marshal.Jsonable> getIncludedData(@Nonnull ResourcePhase resourcePhase)
@Nonnull public Set<String> getExcludedResolved()
Requestable
should only ever be served to the UI once.
Use this list to avoid incurring the full graph traversal cost each time you need
the complete list of "already used" content, such as:
@Nonnull public Globals getGlobals()
public RawRequest getRawRequest()
@Nonnull public Snapshot getSnapshot()
It is another layer of cache over the 'globals.getBundles()' because it is used very heavily, to avoid any performance drawbacks of atomic reference in the 'globals.getBundles()'.
public boolean isAutoIncludeFrontendRuntimeEnabled()
@Deprecated @Nonnull public Optional<DefaultWebResourceSet> getSyncResourceSet()
getRawRequest() with ResourcePhase.INLINE.@Deprecated public void setSyncResourceSet(@Nullable DefaultWebResourceSet set)
setSyncbatchEnabled(boolean) instead.public UrlBuildingStrategy getUrlStrategy()
@Deprecated public void markSyncResourcesAsWritten()
ResourcePhase.INLINE.public SuperbatchConfiguration getSuperbatchConfiguration()
public void setSyncbatchEnabled(boolean enabled)
public boolean isSyncbatchEnabled()
Copyright © 2024 Atlassian. All rights reserved.