public class StreamListenerForTableKey extends Thread
StreamListenerForTableKey listens on a redis cluster stream.Thread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
StreamListenerForTableKey(String streamID,
BalanceManager balanceManager)
This thread listen on and update table to slot key change event on given redis cluster stream
id
|
| Modifier and Type | Method and Description |
|---|---|
void |
run() |
void |
sendNewKeyAddedMessage(String tableName,
String slotKey)
Send a broadcast to redis cluster stream that a new slot key has been assigned to the
corresponding tableName
|
void |
shutDown() |
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 StreamListenerForTableKey(String streamID, BalanceManager balanceManager)
streamID - The stream id for listeningpublic void sendNewKeyAddedMessage(String tableName, String slotKey)
tableName - the table name for which slot key has been assignedslotKey - the Slot key which has been assignedpublic void shutDown()
Copyright © 2021. All rights reserved.