Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. @Getter
  2. public class JedisSettings {
  3.  
  4. private final String address;
  5. private final int port;
  6. private final String password;
  7. private final boolean auth;
  8.  
  9. private final JedisPool jedisPool;
  10.  
  11. public JedisSettings(String address, int port, boolean auth, String password) {
  12. this.address = address;
  13. this.port = port;
  14. this.password = password;
  15. this.auth = auth;
  16.  
  17. this.jedisPool = new JedisPool(this.address, this.port);
  18. if(auth) {
  19. this.jedisPool.getResource().auth(this.password);
  20. }
  21. }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement