English中文

RequestScheduler

请求调度程序用于跟踪和限制活动请求的数量,以便对传入请求进行优先级排序。在 CesiumJS 中保持对请求数量的控制的能力非常重要,因为由于诸如相机位置变化之类的事件,可能会生成大量新请求,并且大量正在进行的请求可能会变得多余。请求调度程序手动限制请求数量,以便较新的请求在较短的队列中等待,并且不必与已过期的请求竞争带宽。 The request scheduler is used to track and constrain the number of active requests in order to prioritize incoming requests. The ability to retain control over the number of requests in CesiumJS is important because due to events such as changes in the camera position, a lot of new requests may be generated and a lot of in-flight requests may become redundant. The request scheduler manually constrains the number of requests so that newer requests wait in a shorter queue and don't have to compete for bandwidth with requests that have expired.

成员 Members

static Cesium.RequestScheduler.maximumRequests : number

同时活动请求的最大数量。未限制的请求不遵守此限制。 The maximum number of simultaneous active requests. Un-throttled requests do not observe this limit.
默认值: Default Value: 50

static Cesium.RequestScheduler.maximumRequestsPerServer : number

每个服务器同时活动请求的最大数量。未限制的请求或服务器中特别列出 The maximum number of simultaneous active requests per server. Un-throttled requests or servers specifically listed in requestsByServer 不遵守此限制。 do not observe this limit.
默认值: Default Value: 18

static Cesium.RequestScheduler.requestsByServer : object

用于限制的每个服务器关键覆盖列表,而不是 A per server key list of overrides to use for throttling instead of maximumRequestsPerServer。当从已知的 HTTP/2 或 HTTP/3 服务器传输数据时很有用。 . Useful when streaming data from a known HTTP/2 or HTTP/3 server.
示例: Examples:
RequestScheduler.requestsByServer["myserver.com:443"] = 18;
RequestScheduler.requestsByServer = {
  "api.cesium.com:443": 18,
  "assets.cesium.com:443": 18,
};

static Cesium.RequestScheduler.throttleRequests : boolean

指定请求调度程序是否应限制传入请求,或让浏览器在其控制下对请求进行排队。 Specifies if the request scheduler should throttle incoming requests, or let the browser queue requests under its control.
默认值: Default Value: true
需要帮助吗?获得答案的最快方法是从社区和团队那里获得答案 Need help? The fastest way to get answers is from the community and team on the Cesium Forum.