Class ReplicationMessageTransmit.MasterReceiverThread
java.lang.Object
java.lang.Thread
org.apache.derby.impl.store.replication.net.ReplicationMessageTransmit.MasterReceiverThread
- All Implemented Interfaces:
Runnable
- Enclosing class:
ReplicationMessageTransmit
Thread that listens for messages from the slave. A separate thread
listening for messages from the slave is needed because the slave
may send messages to the master at any time, and these messages require
immediate action.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Thread
Thread.Builder, Thread.State, Thread.UncaughtExceptionHandler
-
Field Summary
FieldsFields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate ReplicationMessage
Used to read a replication message sent by the slave.void
run()
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, isVirtual, join, join, join, join, ofPlatform, ofVirtual, onSpinWait, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, sleep, start, startVirtualThread, stop, suspend, threadId, toString, yield
-
Field Details
-
pongMsg
-
-
Constructor Details
-
MasterReceiverThread
MasterReceiverThread(String dbname)
-
-
Method Details
-
run
public void run() -
readMessage
Used to read a replication message sent by the slave. Hangs until a message is received from the slave- Returns:
- the reply message.
- Throws:
ClassNotFoundException
- Class of a serialized object cannot be found.IOException
- 1) if an exception occurs while reading from the stream. 2) if the connection handle is invalid.
-