Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Getter
- public class JedisSettings {
- private final String address;
- private final int port;
- private final String password;
- private final boolean auth;
- private final JedisPool jedisPool;
- public JedisSettings(String address, int port, boolean auth, String password) {
- this.address = address;
- this.port = port;
- this.password = password;
- this.auth = auth;
- this.jedisPool = new JedisPool(this.address, this.port);
- if(auth) {
- this.jedisPool.getResource().auth(this.password);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement