public class GossipRouter
extends java.lang.Object
限定符和类型 | 类和说明 |
---|---|
static interface |
GossipRouter.ConnectionTearListener |
限定符和类型 | 字段和说明 |
---|---|
static byte |
CLOSE |
static byte |
CONNECT |
static byte |
CONNECT_OK |
protected java.util.List<GossipRouter.ConnectionTearListener> |
connectionTearListeners |
protected ThreadFactory |
default_thread_factory |
static byte |
DISCONNECT |
static byte |
DISCONNECT_OK |
static byte |
GOSSIP_GET |
protected Log |
log |
static byte |
MESSAGE |
static byte |
OP_FAIL |
static byte |
PING |
static int |
PORT |
static byte |
SUSPECT |
protected java.util.Timer |
timer |
构造器和说明 |
---|
GossipRouter() |
GossipRouter(int port) |
GossipRouter(int port,
java.lang.String bindAddressString) |
GossipRouter(int port,
java.lang.String bindAddressString,
boolean jmx) |
GossipRouter(int port,
java.lang.String bindAddressString,
boolean jmx,
long expiryTime) |
限定符和类型 | 方法和说明 |
---|---|
void |
clear() |
void |
destroy() |
java.lang.String |
dumpAddresssMappings() |
java.lang.String |
dumpRoutingTable() |
java.lang.String |
dumpRoutingTableDetailed() |
int |
getBacklog() |
java.lang.String |
getBindAddress() |
ThreadFactory |
getDefaultThreadPoolThreadFactory() |
long |
getExpiryTime() |
long |
getLingerTimeout() |
int |
getPort() |
long |
getSocketReadTimeout() |
boolean |
isDiscardLoopbacks() |
boolean |
isRunning() |
boolean |
isStarted() |
static void |
main(java.lang.String[] args) |
protected boolean |
removeGroupIfEmpty(java.lang.String group) |
void |
setBacklog(int backlog) |
void |
setBindAddress(java.lang.String bindAddress) |
void |
setDiscardLoopbacks(boolean discard_loopbacks) |
void |
setExpiryTime(long expiryTime) |
void |
setLingerTimeout(long linger_timeout) |
void |
setPort(int port) |
void |
setSocketReadTimeout(long sock_read_timeout) |
void |
start()
Lifecycle operation.
|
void |
stop()
Always called before destroy().
|
static java.lang.String |
type2String(int type) |
public static final byte CONNECT
public static final byte DISCONNECT
public static final byte GOSSIP_GET
public static final byte MESSAGE
public static final byte SUSPECT
public static final byte PING
public static final byte CLOSE
public static final byte CONNECT_OK
public static final byte OP_FAIL
public static final byte DISCONNECT_OK
public static final int PORT
protected java.util.List<GossipRouter.ConnectionTearListener> connectionTearListeners
protected ThreadFactory default_thread_factory
protected java.util.Timer timer
protected final Log log
public GossipRouter()
public GossipRouter(int port)
public GossipRouter(int port, java.lang.String bindAddressString)
public GossipRouter(int port, java.lang.String bindAddressString, boolean jmx)
public GossipRouter(int port, java.lang.String bindAddressString, boolean jmx, long expiryTime)
public void setPort(int port)
public int getPort()
public void setBindAddress(java.lang.String bindAddress)
public java.lang.String getBindAddress()
public int getBacklog()
public void setBacklog(int backlog)
public void setExpiryTime(long expiryTime)
public long getExpiryTime()
public boolean isStarted()
public boolean isDiscardLoopbacks()
public void setDiscardLoopbacks(boolean discard_loopbacks)
public long getLingerTimeout()
public void setLingerTimeout(long linger_timeout)
public long getSocketReadTimeout()
public void setSocketReadTimeout(long sock_read_timeout)
public ThreadFactory getDefaultThreadPoolThreadFactory()
public static java.lang.String type2String(int type)
public void start() throws java.lang.Exception
java.lang.Exception
public void stop()
public void clear()
public void destroy()
public boolean isRunning()
public java.lang.String dumpRoutingTable()
public java.lang.String dumpRoutingTableDetailed()
public java.lang.String dumpAddresssMappings()
protected boolean removeGroupIfEmpty(java.lang.String group)
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception