private final class RecommendationRetriever implements Retriever<Long,Recommendations> {
@Override
public Recommendations get(Long key) throws TasteException {
log.debug("Retrieving new recommendations for user ID '{}'", key);
int howMany = maxHowMany[0];
IDRescorer rescorer = currentRescorer;
List<RecommendedItem> recommendations =
rescorer == null ? recommender.recommend(key, howMany, null, currentlyIncludeKnownItems) :
recommender.recommend(key, howMany, rescorer, currentlyIncludeKnownItems);
return new Recommendations(Collections.unmodifiableList(recommendations));
}