Package cluster
Class StreamListenerForTableKey
java.lang.Object
java.lang.Thread
cluster.StreamListenerForTableKey
- All Implemented Interfaces:
Runnable
StreamListenerForTableKey listens on a redis cluster stream.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler -
Field Summary
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY -
Constructor Summary
ConstructorsConstructorDescriptionStreamListenerForTableKey(String streamID, BalanceManager balanceManager) This thread listen on and update table to slot key change event on given redis cluster stream id -
Method Summary
Modifier and TypeMethodDescriptionvoidrun()voidsendNewKeyAddedMessage(String tableName, String slotKey) Send a broadcast to redis cluster stream that a new slot key has been assigned to the corresponding tableNamevoidshutDown()Methods inherited from class java.lang.Thread
activeCount, checkAccess, clone, countStackFrames, currentThread, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, suspend, toString, yield
-
Constructor Details
-
StreamListenerForTableKey
This thread listen on and update table to slot key change event on given redis cluster stream id- Parameters:
streamID- The stream id for listening
-
-
Method Details
-
run
public void run() -
sendNewKeyAddedMessage
Send a broadcast to redis cluster stream that a new slot key has been assigned to the corresponding tableName- Parameters:
tableName- the table name for which slot key has been assignedslotKey- the Slot key which has been assigned
-
shutDown
public void shutDown()
-