|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
org.apache.zookeeper.server.quorum.LearnerHandler
public class LearnerHandler
There will be an instance of this class created by the Leader for each learner. All communication with a learner is handled by this class.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
protected long |
sid
ZooKeeper server identifier of this learner |
protected java.net.Socket |
sock
|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Method Summary | |
|---|---|
QuorumPeer.LearnerType |
getLearnerType()
|
java.net.Socket |
getSocket()
|
static java.lang.String |
packetToString(QuorumPacket p)
|
void |
ping()
ping calls from the leader to the peers |
void |
run()
This thread will receive packets from the peer and process them and also listen to new connections from new peers. |
void |
shutdown()
|
boolean |
synced()
|
long |
tickOfLastAck()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.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, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final java.net.Socket sock
protected long sid
| Method Detail |
|---|
public java.net.Socket getSocket()
public java.lang.String toString()
toString in class java.lang.Threadpublic QuorumPeer.LearnerType getLearnerType()
public static java.lang.String packetToString(QuorumPacket p)
public void run()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void shutdown()
public long tickOfLastAck()
public void ping()
public boolean synced()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||