public final class CachingUserNeighborhood extends Object implements UserNeighborhood
UserNeighborhood
implementation.Constructor and Description |
---|
CachingUserNeighborhood(UserNeighborhood neighborhood,
DataModel dataModel) |
Modifier and Type | Method and Description |
---|---|
long[] |
getUserNeighborhood(long userID) |
void |
refresh(Collection<Refreshable> alreadyRefreshed)
Triggers "refresh" -- whatever that means -- of the implementation.
|
public CachingUserNeighborhood(UserNeighborhood neighborhood, DataModel dataModel) throws TasteException
TasteException
public long[] getUserNeighborhood(long userID) throws TasteException
getUserNeighborhood
in interface UserNeighborhood
userID
- ID of user for which a neighborhood will be computedTasteException
- if an error occurs while accessing datapublic void refresh(Collection<Refreshable> alreadyRefreshed)
Refreshable
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.
refresh
in interface Refreshable
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.