public class QuorumCnxManager
extends java.lang.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 |
java.util.concurrent.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(java.nio.channels.SocketChannel s,
java.lang.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(java.lang.Long sid,
java.nio.ByteBuffer b)
Processes invoke this message to queue a message to send.
|
public final java.util.concurrent.ArrayBlockingQueue<QuorumCnxManager.Message> recvQueue
public final QuorumCnxManager.Listener listener
public QuorumCnxManager(QuorumPeer self)
public void testInitiateConnection(long sid) throws java.lang.Exception
sid
- java.lang.Exception
public boolean initiateConnection(java.nio.channels.SocketChannel s, java.lang.Long sid)
public void toSend(java.lang.Long sid, java.nio.ByteBuffer b)
public void connectAll()
public void halt()
public void softHalt()
public long getThreadCount()
public QuorumPeer getQuorumPeer()
Copyright © 2012 The Apache Software Foundation