public interface Refreshable
Implementations of this interface have state that can be periodically refreshed. For example, an
implementation instance might contain some pre-computed information that should be periodically refreshed.
The refresh(Collection)
method triggers such a refresh.
All Taste components implement this. In particular,
Recommender
s do. Callers may want to call
refresh(Collection)
periodically to re-compute information throughout the system and bring it up
to date, though this operation may be expensive.
Modifier and Type | Method and Description |
---|---|
void |
refresh(Collection<Refreshable> alreadyRefreshed)
Triggers "refresh" -- whatever that means -- of the implementation.
|
void refresh(Collection<Refreshable> alreadyRefreshed)
Triggers "refresh" -- whatever that means -- of the implementation. The general contract is that any
Refreshable
should always leave itself in a consistent, operational state, and that the refresh
atomically updates internal state from old to new.
alreadyRefreshed
- Refreshable
s that are known to have already been
refreshed as a result of an initial call to a {#refresh(Collection)} method on some
object. This ensure that objects in a refresh dependency graph aren't refreshed twice
needlessly.Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.