@Test public void testReleaseInvalidUser() { PlusAnonymousConcurrentUserDataModel instance = getTestableWithoutDelegateData(10); assertFalse(instance.releaseUser(Long.MAX_VALUE)); }
public boolean releaseUser(Long userID) { if (tempPrefs.containsKey(userID)) { this.clearTempPrefs(userID); usersPool.offer(userID); return true; } return false; }
PlusAnonymousConcurrentUserDataModel extends PlusAnonymousUserDataModel { public boolean releaseUser(Long userID) { if (tempPrefs.containsKey(userID)) { this.clearTempPrefs(userID); usersPool.offer(userID); return true; } return false; } }
PlusAnonymousConcurrentUserDataModel extends PlusAnonymousUserDataModel { public boolean releaseUser(Long userID) { if (tempPrefs.containsKey(userID)) { this.clearTempPrefs(userID); usersPool.offer(userID); return true; } return false; } PlusAnonymousConcurrentUserDataModel(DataModel delegate, int maxConcurrentUsers); }
PlusAnonymousConcurrentUserDataModel extends PlusAnonymousUserDataModel { public boolean releaseUser(Long userID) { if (tempPrefs.containsKey(userID)) { this.clearTempPrefs(userID); usersPool.offer(userID); return true; } return false; } 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 { public boolean releaseUser(Long userID) { if (tempPrefs.containsKey(userID)) { this.clearTempPrefs(userID); usersPool.offer(userID); return true; } return false; } 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);  }