org.apache.mahout.cf.taste.common
Interface Refreshable

All Known Subinterfaces:
CandidateItemsStrategy, DataModel, Factorizer, IDMigrator, ItemBasedRecommender, ItemSimilarity, JDBCDataModel, MostSimilarItemsCandidateItemsStrategy, PreferenceInferrer, Recommender, UpdatableIDMigrator, UserBasedRecommender, UserNeighborhood, UserSimilarity
All Known Implementing Classes:
AbstractCandidateItemsStrategy, AbstractDataModel, AbstractFactorizer, AbstractIDMigrator, AbstractItemSimilarity, AbstractJDBCIDMigrator, AbstractRecommender, AllSimilarItemsCandidateItemsStrategy, AllUnknownItemsCandidateItemsStrategy, ALSWRFactorizer, AveragingPreferenceInferrer, CachingItemSimilarity, CachingRecommender, CachingUserNeighborhood, CachingUserSimilarity, CityBlockSimilarity, EuclideanDistanceSimilarity, FileDataModel, FileIDMigrator, FileItemSimilarity, GenericBooleanPrefDataModel, GenericBooleanPrefItemBasedRecommender, GenericBooleanPrefUserBasedRecommender, GenericDataModel, GenericItemBasedRecommender, GenericItemSimilarity, GenericUserBasedRecommender, GenericUserSimilarity, ItemAverageRecommender, ItemUserAverageRecommender, LogLikelihoodSimilarity, MemoryIDMigrator, MySQLJDBCIDMigrator, NearestNUserNeighborhood, ParallelSGDFactorizer, PearsonCorrelationSimilarity, PlusAnonymousConcurrentUserDataModel, PlusAnonymousUserDataModel, PreferredItemsNeighborhoodCandidateItemsStrategy, RandomRecommender, RatingSGDFactorizer, RefreshHelper, SamplingCandidateItemsStrategy, SpearmanCorrelationSimilarity, SVDPlusPlusFactorizer, SVDRecommender, TanimotoCoefficientSimilarity, ThresholdUserNeighborhood, UncenteredCosineSimilarity

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, Recommenders 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.


Method Summary
 void refresh(Collection<Refreshable> alreadyRefreshed)
           Triggers "refresh" -- whatever that means -- of the implementation.
 

Method Detail

refresh

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.

Parameters:
alreadyRefreshed - Refreshables 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–2014 The Apache Software Foundation. All rights reserved.