public abstract class AbstractPreferenceSnapshot extends Object implements PreferenceSnapshot
Modifier and Type | Field and Description |
---|---|
protected Long2ObjectMap<SparseVector> |
cache
The user vector cache.
|
Constructor and Description |
---|
AbstractPreferenceSnapshot()
Initialize the snapshot.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the build context.
|
SparseVector |
userRatingVector(long userId)
Get the current preferences of a particular user in SparseVector form.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getItemIds, getRatings, getUserIds, getUserRatings, itemIndex, userIndex
protected Long2ObjectMap<SparseVector> cache
public AbstractPreferenceSnapshot()
public SparseVector userRatingVector(long userId)
PreferenceSnapshot
userRatingVector
in interface PreferenceSnapshot
userId
- The user's ID.@OverridingMethodsMustInvokeSuper public void close()
PreferenceSnapshot
Closeable.close()
to drop the exception that
can be thrown.
After the build context has been closed, all methods are allowed to fail. Objects returned from those methods, however, should continue to be valid.
close
in interface Closeable
close
in interface AutoCloseable
close
in interface PreferenceSnapshot