org.apache.zookeeper.server.quorum
public class QuorumCnxManager extends Object
Modifier and Type | Class and Description |
---|---|
class |
QuorumCnxManager.Listener
Thread to listen on some port
|
static class |
QuorumCnxManager.Message |
Modifier and Type | Field and Description |
---|---|
QuorumCnxManager.Listener |
listener |
ArrayBlockingQueue<QuorumCnxManager.Message> |
recvQueue |
Constructor and Description |
---|
QuorumCnxManager(QuorumPeer self) |
Modifier and Type | Method and Description |
---|---|
void |
connectAll()
Try to establish a connection with each server if one
doesn't exist.
|
QuorumPeer |
getQuorumPeer()
Return reference to QuorumPeer
|
long |
getThreadCount() |
void |
halt()
Flag that it is time to wrap up all activities and interrupt the listener.
|
boolean |
initiateConnection(SocketChannel s,
Long sid)
If this server has initiated the connection, then it gives up on the
connection if it loses challenge.
|
void |
softHalt()
A soft halt simply finishes workers.
|
void |
testInitiateConnection(long sid)
Invokes initiateConnection for testing purposes
|
void |
toSend(Long sid,
ByteBuffer b)
Processes invoke this message to queue a message to send.
|
public final ArrayBlockingQueue<QuorumCnxManager.Message> recvQueue
public final QuorumCnxManager.Listener listener
public QuorumCnxManager(QuorumPeer self)
public void testInitiateConnection(long sid) throws Exception
sid
- Exception
public boolean initiateConnection(SocketChannel s, Long sid)
public void toSend(Long sid, ByteBuffer b)
public void connectAll()
public void halt()
public void softHalt()
public long getThreadCount()
public QuorumPeer getQuorumPeer()
Copyright © 2014 The Apache Software Foundation