public abstract class SingleObjectCache<T> extends Object
| 修飾子とタイプ | フィールドと説明 |
|---|---|
protected long |
lastRefreshTimestamp |
| 修飾子 | コンストラクタと説明 |
|---|---|
protected |
SingleObjectCache(TimeValue refreshInterval,
T initialValue) |
| 修飾子とタイプ | メソッドと説明 |
|---|---|
T |
getOrRefresh()
Returns the currently cached object and potentially refreshes the cache before returning.
|
protected boolean |
needsRefresh()
Returns
true iff the cache needs to be refreshed. |
protected abstract T |
refresh()
Returns a new instance to cache
|
public T getOrRefresh()
protected abstract T refresh()
protected boolean needsRefresh()
true iff the cache needs to be refreshed.Copyright © 2009–2016. All rights reserved.