Thread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
PubSubPublisher(String identifier,
com.reve.redis.cluster.ClusterObserver clusterObserver) |
| Modifier and Type | Method and Description |
|---|---|
void |
ackFreezeRequest(long accountID)
For some reason like balance mismatch between redis and mysql in some point, we may need to freeze the account
and match the balance in redis and mysql.
|
void |
publishAccountValidationStatus(long accountID,
LeaseDTOStatus status)
Whenever any accountID that is unknown/newly introduced to DB at first.
|
void |
publishCompletedFreeze(long accountID)
For some reason like balance mismatch between redis and mysql in some point, we may need to freeze the account
and match the balance in redis and mysql.
|
void |
publishCompletedUnfreeze(long accountID)
When balance matching is done by mitigation process, it will send an unfreeze request.
|
void |
publishEmptyLeaseStatus(long accountID)
Whenever Balance manager detects zero balance in redis cache, it transmits a warning to all Balance manager.
|
void |
publishFreezeRequest(long accountID)
Publish a
MessageType.FREEZE_REQUEST message in Channels.BALANCE_FREEZE_CHANNEL to
freeze the given account ID. |
void |
publishNegativeRedisBalance(long accountID)
Whenever Balance is getting negative in redis.
|
void |
publishUnfreezeRequest(long accountID)
Publish a
MessageType.UNFREEZE_REQUEST message in Channels.BALANCE_FREEZE_CHANNEL to
un-freeze the given account ID. |
void |
run()
Thread run method.
|
void |
shutDown()
Shutdown this thread
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic PubSubPublisher(String identifier, com.reve.redis.cluster.ClusterObserver clusterObserver)
public void run()
public void publishEmptyLeaseStatus(long accountID)
accountID - Account ID for which balance goes to zero in redis.public void publishNegativeRedisBalance(long accountID)
Channels.BALANCE_SYNC_CHANNEL channel. So that other balance manager can back balance to redis.accountID - who is affected by negative balance.public void publishAccountValidationStatus(long accountID,
LeaseDTOStatus status)
Channels.ACCOUNT_VALIDATION_CHANNEL channel. So that other balance manager can update the account status.accountID - whose status is changed.status - 1 if valid, 0 otherwise.public void ackFreezeRequest(long accountID)
accountID - Account ID for which freeze request was received.public void publishCompletedFreeze(long accountID)
accountID - Account ID for which freeze request was received.public void publishCompletedUnfreeze(long accountID)
accountID - Account ID for which unfreeze request was received.public void publishFreezeRequest(long accountID)
MessageType.FREEZE_REQUEST message in Channels.BALANCE_FREEZE_CHANNEL to
freeze the given account ID. Once we send this message, the receiver on the other end will send an
MessageType.ACK_FREEZE_REQUEST immediately. And then the receiver will do whatever it required at
their end to freeze the request.accountID - Account ID for which freeze request to be sent.public void publishUnfreezeRequest(long accountID)
MessageType.UNFREEZE_REQUEST message in Channels.BALANCE_FREEZE_CHANNEL to
un-freeze the given account ID. Once we send this message, the receiver on the other end will do whatever it
required at their end to un-freeze the request.accountID - Account ID for which un-freeze request to be sent.public void shutDown()
Copyright © 2024. All rights reserved.