RefreshEngine
cdf.dashboard. RefreshEngine
Class that manages the periodic refresh of components.
AMD Module
require(["cdf/dashboard/RefreshEngine"], function(RefreshEngine) { /* code goes here */ });
Constructor
Name | Description |
---|---|
new RefreshEngine(dashboard) | Class that manages the periodic refresh of components. |
Methods
Name | Description |
---|---|
fireGlobalRefresh() | Updates all components that do not have a valid refresh period. |
fireRefresh() | Pops up due items from the queue, refreshes components and sets the next timeout. |
getRefreshPeriod(component) : number | Gets the refresh period for a component. |
processComponent(component) : boolean | Removes and adds the given component into the refresh queue restarting the timer if it is the first in the queue. |
processComponents() : boolean | Clears the queue, adds all the dashboard components into the queue, and restarts the timer. |
registerComponent(component, refreshPeriod) : boolean | Sets a components refresh period and clears it from the queue. |
setGlobalRefresh(refreshPeriod) | Sets the global refresh period. |
Constructor Details
new RefreshEngine(dashboard) | ||||||
---|---|---|---|---|---|---|
Builds a new refresh engine for the provided dashboard. Source: dashboard/RefreshEngine.js, line 18
|
Methods Details
fireGlobalRefresh() |
---|
Called when a valid |
fireRefresh() |
---|
Pops up due items from the queue, refreshes components and sets the next timeout. |
getRefreshPeriod(component) : number | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Gets the refresh period for a component. Source: dashboard/RefreshEngine.js, line 352
|
processComponent(component) : boolean | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Removes and adds the given component into the refresh queue. If the component is the first in the sorted queue, {cdf.dashboard.RefreshEngine.restartTimer|restartTimer} is executed. Source: dashboard/RefreshEngine.js, line 368
|
processComponents() : boolean | ||||
---|---|---|---|---|
Clears the queue, adds all the dashboard components into the queue, and restarts the timer. Source: dashboard/RefreshEngine.js, line 382
|
registerComponent(component, refreshPeriod) : boolean | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Sets a components refresh period and clears it from the queue. Source: dashboard/RefreshEngine.js, line 334
|
setGlobalRefresh(refreshPeriod) | ||||||
---|---|---|---|---|---|---|
Sets the global refresh period. Source: dashboard/RefreshEngine.js, line 440
|