Constructor
new AbsentResourceList(maxTrys, minCheckInterval)
Constructs an absent resource list.
Parameters:
Name | Type | Description |
---|---|---|
maxTrys |
Number | The number of attempts to make before the resource is marked as absent. |
minCheckInterval |
Number | The amount of time to wait between attempts, in milliseconds. |
- Source:
Members
maxTrys :Number
The number of attempts to make before the resource is marked as absent.
Type:
- Number
- Source:
minCheckInterval :Number
The amount of time to wait before each attempt.
Type:
- Number
- Source:
tryAgainInterval :number
The amount of time, in milliseconds, beyond which retrieval attempts should again be allowed.
When this time has elapsed from the most recent failed attempt the number of trys attempted is
reset to 0. This prevents the resource from being permanently blocked.
Type:
- number
- Default Value:
- 60,000 milliseconds (one minute)
- Source:
Methods
isResourceAbsent(resourceId) → {Boolean}
Indicates whether a specified resource is marked as absent.
Parameters:
Name | Type | Description |
---|---|---|
resourceId |
String | The resource identifier. |
- Source:
Returns:
true if the resource is marked as absent, otherwise false.
- Type
- Boolean
markResourceAbsent(resourceId)
Marks a resource attempt as having failed. This increments the number-of-tries counter and sets the time
of the last attempt. When this method has been called this.maxTrys
times the resource is marked as absent until this absent resource list's
try-again-interval is reached.
Parameters:
Name | Type | Description |
---|---|---|
resourceId |
String | The resource identifier. |
- Source:
markResourceAbsentPermanently(resourceId)
Marks a resource attempt as having failed permanently. No attempt will ever again be made to retrieve
the resource.
Parameters:
Name | Type | Description |
---|---|---|
resourceId |
String | The resource identifier. |
- Source:
unmarkResourceAbsent(resourceId)
Removes the specified resource from this absent resource list. Call this method when retrieval attempts
succeed.
Parameters:
Name | Type | Description |
---|---|---|
resourceId |
String | The resource identifier. |
- Source: