Guest User

Untitled

a guest
Dec 16th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. public ViewLayer() {
  2. //TODO: change to pool
  3. j = new Jedis("127.0.0.1", 6379);
  4. }
  5.  
  6. public static void main(String args[]) throws InterruptedException {
  7. ViewLayer v = new ViewLayer();
  8. while (true) {
  9. Set<Tuple> tokens = v.j.zrevrangeByScoreWithScores("global-token-count", "+inf", "-inf", 10, 10);
  10. for (Tuple token : tokens) {
  11. System.out.println(token.getElement() + "," + token.getScore());
  12. }
  13. Thread.sleep(1000*60);
  14. //TODO: repeat the same for each movie
  15. // for (String s : j.smembers("movieslist")) {
  16. //
  17. // }
  18. }
  19. }
Add Comment
Please, Sign In to add comment