@Test public void testGetNumUsersWithDelegateUsersOnly() throws TasteException { PreferenceArray prefs = new GenericUserPreferenceArray(1); long sampleUserID = 1; prefs.setUserID(0, sampleUserID); long sampleItemID = 11; prefs.setItemID(0, sampleItemID); FastByIDMap<PreferenceArray> delegatePreferences = new FastByIDMap<PreferenceArray>(); delegatePreferences.put(sampleUserID, prefs); PlusAnonymousConcurrentUserDataModel instance = getTestableWithDelegateData(10, delegatePreferences); assertEquals(1, instance.getNumUsers()); }
@Override public int getNumUsers() throws TasteException { return getDelegate().getNumUsers(); }
PlusAnonymousConcurrentUserDataModel extends PlusAnonymousUserDataModel { @Override public int getNumUsers() throws TasteException { return getDelegate().getNumUsers(); } }
PlusAnonymousConcurrentUserDataModel extends PlusAnonymousUserDataModel { @Override public int getNumUsers() throws TasteException { return getDelegate().getNumUsers(); } PlusAnonymousConcurrentUserDataModel(DataModel delegate, int maxConcurrentUsers); }
PlusAnonymousConcurrentUserDataModel extends PlusAnonymousUserDataModel { @Override public int getNumUsers() throws TasteException { return getDelegate().getNumUsers(); } PlusAnonymousConcurrentUserDataModel(DataModel delegate, int maxConcurrentUsers); Long takeAvailableUser(); boolean releaseUser(Long userID); void setTempPrefs(PreferenceArray prefs, long anonymousUserID); void clearTempPrefs(long anonymousUserID); @Override LongPrimitiveIterator getUserIDs(); @Override PreferenceArray getPreferencesFromUser(long userID); @Override FastIDSet getItemIDsFromUser(long userID); @Override PreferenceArray getPreferencesForItem(long itemID); @Override Float getPreferenceValue(long userID, long itemID); @Override Long getPreferenceTime(long userID, long itemID); @Override int getNumUsers(); @Override int getNumUsersWithPreferenceFor(long itemID); @Override int getNumUsersWithPreferenceFor(long itemID1, long itemID2); @Override void setPreference(long userID, long itemID, float value); @Override void removePreference(long userID, long itemID); }
PlusAnonymousConcurrentUserDataModel extends PlusAnonymousUserDataModel { @Override public int getNumUsers() throws TasteException { return getDelegate().getNumUsers(); } PlusAnonymousConcurrentUserDataModel(DataModel delegate, int maxConcurrentUsers); Long takeAvailableUser(); boolean releaseUser(Long userID); void setTempPrefs(PreferenceArray prefs, long anonymousUserID); void clearTempPrefs(long anonymousUserID); @Override LongPrimitiveIterator getUserIDs(); @Override PreferenceArray getPreferencesFromUser(long userID); @Override FastIDSet getItemIDsFromUser(long userID); @Override PreferenceArray getPreferencesForItem(long itemID); @Override Float getPreferenceValue(long userID, long itemID); @Override Long getPreferenceTime(long userID, long itemID); @Override int getNumUsers(); @Override int getNumUsersWithPreferenceFor(long itemID); @Override int getNumUsersWithPreferenceFor(long itemID1, long itemID2); @Override void setPreference(long userID, long itemID, float value); @Override void removePreference(long userID, long itemID);  }