@NotThreadSafe public class TimeoutRefresh extends Object implements RefreshPolicy
Constructor and Description |
---|
TimeoutRefresh(long refreshPeriodMs)
Constructs a refresh facility which allows refreshing after a specified timeout is reached.
|
Modifier and Type | Method and Description |
---|---|
boolean |
attempt()
Checks if it is time to perform the next refresh and returns immediately.
|
public TimeoutRefresh(long refreshPeriodMs)
refreshPeriodMs
- period of time to refresh after, in millisecondspublic boolean attempt()
RefreshPolicy
attempt
in interface RefreshPolicy
Copyright © 2023. All Rights Reserved.