public class RequestState extends Object
| Modifier and Type | Field and Description |
|---|---|
protected RequestCache |
cache |
protected LinkedHashSet<String> |
excluded |
protected Set<String> |
excludedData |
protected Globals |
globals |
protected LinkedHashSet<String> |
included |
protected LinkedHashMap<String,com.atlassian.json.marshal.Jsonable> |
includedData |
| Constructor and Description |
|---|
RequestState(Globals globals,
UrlBuildingStrategy urlBuildingStrategy) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearIncludedAndUpdateExcluded(LinkedHashSet<String> excludedResolved)
Called after generating urls, to clear current state and remember already included resources.
|
RequestState |
deepClone() |
BigPipe |
getBigPipe() |
long |
getBigPipeDeadline() |
RequestCache |
getCache() |
LinkedHashSet<String> |
getExcluded() |
Set<String> |
getExcludedData() |
Globals |
getGlobals() |
LinkedHashSet<String> |
getIncluded() |
LinkedHashMap<String,com.atlassian.json.marshal.Jsonable> |
getIncludedData() |
Snapshot |
getSnapshot()
Get all bundles.
|
Optional<DefaultWebResourceSet> |
getSyncResourceSet() |
UrlBuildingStrategy |
getUrlStrategy() |
void |
markSyncResourcesAsWritten()
Mark that the initial set of sync resources was already written into page
|
void |
setBigPipeDeadline(long deadline) |
void |
setSyncResourceSet(DefaultWebResourceSet set)
Set the initial set of sync resources which should be written at the top of the page
|
String |
toString() |
protected final LinkedHashSet<String> included
protected final LinkedHashSet<String> excluded
protected final LinkedHashMap<String,com.atlassian.json.marshal.Jsonable> includedData
protected final RequestCache cache
protected final Globals globals
public RequestState(Globals globals, UrlBuildingStrategy urlBuildingStrategy)
public UrlBuildingStrategy getUrlStrategy()
public RequestState deepClone()
public void setBigPipeDeadline(long deadline)
public long getBigPipeDeadline()
public LinkedHashSet<String> getIncluded()
public LinkedHashMap<String,com.atlassian.json.marshal.Jsonable> getIncludedData()
public LinkedHashSet<String> getExcluded()
public BigPipe getBigPipe()
public void clearIncludedAndUpdateExcluded(LinkedHashSet<String> excludedResolved)
public Globals getGlobals()
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 RequestCache getCache()
public Optional<DefaultWebResourceSet> getSyncResourceSet()
public void setSyncResourceSet(DefaultWebResourceSet set)
public void markSyncResourcesAsWritten()
Copyright © 2018 Atlassian. All rights reserved.