public class RechargeManager extends Object
| Constructor and Description |
|---|
RechargeManager(com.reve.redis.cluster.ClusterObserver clusterObserver)
Create an instance for Redis balance update with SSL.
|
RechargeManager(String redisClusterHostIp,
int redisClusterHostPort,
String redisClusterPassword,
com.reve.websocket.ssl.SSLConfiguration sslConfiguration)
Create an instance for Redis balance update with SSL.
|
| Modifier and Type | Method and Description |
|---|---|
Double |
decreaseBalance(long accountID,
double balance,
double credit)
Decrease the balance for the given accountID
|
Double |
increaseBalance(long accountID,
double balance,
double credit)
Increase the balance for the given accountID
|
public RechargeManager(String redisClusterHostIp, int redisClusterHostPort, String redisClusterPassword, com.reve.websocket.ssl.SSLConfiguration sslConfiguration)
redisClusterHostIp - Redis cluster host ip addressredisClusterHostPort - Redis cluster host portredisClusterPassword - Redis cluster auth passwordsslConfiguration - SSL Configuration for redis cluster. If this value is null, communication with the
server will be done using non-ssl tcp socket.public RechargeManager(com.reve.redis.cluster.ClusterObserver clusterObserver)
clusterObserver - contains all the connections to the redis-clusterpublic Double increaseBalance(long accountID, double balance, double credit)
accountID - Account id for balance to be increasedbalance - Amount of balance to be increasedcredit - Amount of credit value to be increasedpublic Double decreaseBalance(long accountID, double balance, double credit)
accountID - Account id for balance to be decreasedbalance - Amount of balance to be decreasedcredit - Amount of credit value to be decreasedCopyright © 2025. All rights reserved.