Class Mitigator
java.lang.Object
com.reve.balancemanager.mitigation.Mitigator
- Direct Known Subclasses:
MitigatorImpl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddBMToACKSet(String BMIdentifier) Add the name of the balance manager in the ack received list.abstract voidaddBMToFrozenSet(String BMIdentifier) Add the name of the balance manager in the account freeze complete message received list.abstract voidaddBMToUnfrozenSet(String BMIdentifier) Add the name of the balance manager in the account unfrozen complete received list.protected static voidstatic Mitigatorabstract voidinit(BalanceManager balanceManager, long accountID, Double balance, Double credit) Initialize the instance specifying the account for which this thread will be called and under which mitigator this thread will work
-
Constructor Details
-
Mitigator
public Mitigator()
-
-
Method Details
-
init
public abstract void init(BalanceManager balanceManager, long accountID, Double balance, Double credit) Initialize the instance specifying the account for which this thread will be called and under which mitigator this thread will work- Parameters:
accountID- the account for which balance sync between MySQL and Redis will happenbalance- Balance amount present in mysql for this account id.credit- Credit amount present in mysql for this account id.balanceManager-BalanceMitigatorreference for mitigator
-
addBMToACKSet
Add the name of the balance manager in the ack received list. When account freeze ACK is received from any balance manager, this method should be called to add the name in the list.- Parameters:
BMIdentifier- Identification name of the balance manager
-
addBMToFrozenSet
Add the name of the balance manager in the account freeze complete message received list. When account freeze complete is received from any balance manager, this method should be called to add the name in the list.- Parameters:
BMIdentifier- Identification name of the balance manager
-
addBMToUnfrozenSet
Add the name of the balance manager in the account unfrozen complete received list. When account unfreeze complete is received from any balance manager, this method should be called to add the name in the list.- Parameters:
BMIdentifier- Identification name of the balance manager
-
getInstance
-
getClassReference
protected static void getClassReference()
-