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 |
---|---|
dispose() | Clears resources associated with the refresh engine. |
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. |
unregisterComponent(component) | Removes the component registration from the refresh engine queue. |
Constructor Details
new RefreshEngine(dashboard) | ||||||
---|---|---|---|---|---|---|
Builds a new refresh engine for the provided dashboard. Source: dashboard/RefreshEngine.js, line 18
|
Methods Details
dispose() |
---|
Clears resources associated with the refresh engine. |
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 350
|
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 366
|
processComponents() : boolean | ||||
---|---|---|---|---|
Clears the queue, adds all the dashboard components into the queue, and restarts the timer. Source: dashboard/RefreshEngine.js, line 380
|
registerComponent(component, refreshPeriod) : boolean | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Sets a components refresh period and clears it from the queue. Source: dashboard/RefreshEngine.js, line 321
|
setGlobalRefresh(refreshPeriod) | ||||||
---|---|---|---|---|---|---|
Sets the global refresh period. Source: dashboard/RefreshEngine.js, line 438
|
unregisterComponent(component) | ||||||
---|---|---|---|---|---|---|
Removes the component registration from the refresh engine queue. Source: dashboard/RefreshEngine.js, line 336
|