Index

B C D E F G L O P R S T U W 
All Classes and Interfaces|All Packages|Constant Field Values

B

balance - package balance
 
BALANCE_FIELD - Static variable in class balance.LeaseDTO
Redis cluster balance field constant key.
BalanceManager - Class in balance
Manages balance information for all clients presents in mysql BalanceManager.CLIENT_BALANCE_TABLE table.
BalanceManager(String, int, String) - Constructor for class balance.BalanceManager
Create an instance of BalanceManager.

C

channelName - Variable in class cluster.PubSubPublisher
 
CLIENT_BALANCE_TABLE - Static variable in class balance.BalanceManager
Mysql table name where balance information can be found
cluster - package cluster
 

D

decreaseLeaseAmount(double) - Method in class balance.LeaseDTO
Extra amount left at the end of the call is added to the lease (make sure to provide +ve value).
DisplayFormat - Class in util
 
DisplayFormat() - Constructor for class util.DisplayFormat
 

E

EMPTY_STATUS - Static variable in class cluster.PubSubPublisher
 
EXHAUSTED_STATUS - Static variable in class cluster.PubSubPublisher
 

F

Functions - Class in util
 
Functions() - Constructor for class util.Functions
 

G

getAvailableLocalBalance() - Method in class balance.LeaseDTO
 
getCallerLocation() - Static method in class util.Functions
 
getClusterObserver() - Method in class balance.BalanceManager
Getter for BalanceManager.clusterObserver
getDefaultDecimalPoint() - Static method in class util.DisplayFormat
 
getDefaultLeaseChunkAmount() - Method in class balance.BalanceManager
 
getLease(double) - Method in class balance.LeaseDTO
Try to get a lease from this account balance.
getLease(long, double) - Method in class balance.BalanceManager
Try to get a lease from this account balance.
getLeasedBalance() - Method in class balance.LeaseDTO
 
getLeasesFromOtherBMs(long) - Method in class balance.BalanceManager
 
getPercentageToRelease() - Method in class balance.BalanceManager
 
getPubSubPublisher() - Method in class balance.BalanceManager
 
getRoundedDecimal(double) - Static method in class util.DisplayFormat
 
getRoundedDecimal(double, int) - Static method in class util.DisplayFormat
 
getStackTrace() - Static method in class util.Functions
 
getThresholdToReleaseFullAmount() - Method in class balance.BalanceManager
 

L

LeaseDTO - Class in balance
This class is responsible for caching balance, taking advanced loan from mysql, giving lease when needed, syncing the balance information between mysql and redis cluster
LeaseDTO(long, BalanceManager) - Constructor for class balance.LeaseDTO
Create a LeaseDTO instance for the given account id

O

onMessage(String, String) - Method in class cluster.PubSubSubscriber
 
onProcessShutdown() - Method in class balance.BalanceManager
We have taken advanced amount from redis cluster, so When system is getting shut down, all the available cached balance should be returned to redis, otherwise some money will be lost.
onSubscribe(String, int) - Method in class cluster.PubSubSubscriber
 
onUnsubscribe(String, int) - Method in class cluster.PubSubSubscriber
 

P

publishEmptyLeaseStatus(long) - Method in class cluster.PubSubPublisher
 
publishExhaustedLeaseStatus(long) - Method in class cluster.PubSubPublisher
 
PubSubListener - Class in cluster
 
PubSubListener(String, PubSubSubscriber, JedisCluster) - Constructor for class cluster.PubSubListener
 
PubSubPublisher - Class in cluster
 
PubSubPublisher(JedisCluster, String) - Constructor for class cluster.PubSubPublisher
 
PubSubSubscriber - Class in cluster
 
PubSubSubscriber(BalanceManager) - Constructor for class cluster.PubSubSubscriber
 

R

readFromDb(long) - Method in class balance.BalanceManager
If the given accountId is not present in redis then it will be loaded from mysql database and be saved in redis cluster.
readResourceFile(String) - Static method in class util.Functions
Read a text resource file.
returnAvailableBalancePercentage(double) - Method in class balance.LeaseDTO
As LeaseDTO is taking lease in chunk amount of from redis Even if all of them are not used.
returnLease(long, double) - Method in class balance.BalanceManager
Extra amount left at the end of the call is added to the lease (make sure to provide +ve value).
run() - Method in class cluster.PubSubListener
 
run() - Method in class cluster.StreamListenerForTableKey
 

S

sendNewKeyAddedMessage(String, String) - Method in class cluster.StreamListenerForTableKey
Send a broadcast to redis cluster stream that a new slot key has been assigned to the corresponding tableName
setDefaultDecimalPoint(int) - Static method in class util.DisplayFormat
 
setDefaultLeaseChunkAmount(double) - Method in class balance.BalanceManager
 
setPercentageToRelease(double) - Method in class balance.BalanceManager
 
setThresholdToReleaseFullAmount(double) - Method in class balance.BalanceManager
 
shutDown() - Method in class cluster.StreamListenerForTableKey
 
StreamListenerForTableKey - Class in cluster
StreamListenerForTableKey listens on a redis cluster stream.
StreamListenerForTableKey(String, BalanceManager) - Constructor for class cluster.StreamListenerForTableKey
This thread listen on and update table to slot key change event on given redis cluster stream id

T

TOKENIZER - Static variable in class balance.BalanceManager
 

U

util - package util
 

W

WAIT_TIME_FULL_RELEASE - Static variable in class balance.LeaseDTO
 
B C D E F G L O P R S T U W 
All Classes and Interfaces|All Packages|Constant Field Values