Skip to content

Instantly share code, notes, and snippets.

@sizovs
Last active August 29, 2015 14:07
Show Gist options
  • Save sizovs/e450b0aec50bdccbc060 to your computer and use it in GitHub Desktop.
Save sizovs/e450b0aec50bdccbc060 to your computer and use it in GitHub Desktop.
@DegradesWithDefaultValue
@Override
public Collection<AnswerNotification> list(AuthorId authorId, Pageable page) {
String key = allNotificationsKey(authorId);
IRedisCacheDAO dao = shardedNotificationsDAOFactory.getDAOByUserId(authorId.asLong());
Set<Tuple> notifications = dao.zrevrangeWithScoresBinary(key, page.getFrom(), page.getTo() + 1);
return transform(notifications, new FromTuple());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment