public abstract class AbstractRemotingServer extends AbstractLifeCycle implements RemotingServer, ConfigurableInstance
| 构造器和说明 |
|---|
AbstractRemotingServer(int port) |
AbstractRemotingServer(String ip,
int port) |
| 限定符和类型 | 方法和说明 |
|---|---|
ConfigContainer |
conf()
get the config container for current instance
|
protected abstract void |
doInit() |
protected abstract boolean |
doStart() |
protected abstract boolean |
doStop() |
void |
init()
已过时。
|
void |
initWriteBufferWaterMark(int low,
int high)
Initialize netty write buffer water mark for remoting instance.
|
String |
ip()
Get the ip of the server.
|
int |
netty_buffer_high_watermark()
get the high water mark for netty write buffer
|
int |
netty_buffer_low_watermark()
get the low water mark for netty write buffer
|
<T> T |
option(BoltOption<T> option)
Get the option value.
|
<T> Configurable |
option(BoltOption<T> option,
T value)
Allow to specify a
BoltOption which is used for the Configurable instances once they got
created. |
int |
port()
Get the port of the server.
|
protected void |
setLocalBindingPort(int port)
override the random port zero with the actual binding port value.
|
void |
shutdown() |
boolean |
start()
已过时。
|
void |
startup() |
boolean |
stop()
已过时。
|
GlobalSwitch |
switches()
get the global switch for current instance
|
ensureStarted, isStartedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitregisterDefaultExecutor, registerProcessor, registerUserProcessorpublic AbstractRemotingServer(int port)
public AbstractRemotingServer(String ip, int port)
@Deprecated public void init()
RemotingServerinit 在接口中 RemotingServer@Deprecated public boolean start()
RemotingServerstart 在接口中 RemotingServer@Deprecated public boolean stop()
RemotingServerstop 在接口中 RemotingServerpublic void startup()
throws LifeCycleException
startup 在接口中 LifeCyclestartup 在类中 AbstractLifeCycleLifeCycleExceptionpublic void shutdown()
throws LifeCycleException
shutdown 在接口中 LifeCycleshutdown 在类中 AbstractLifeCycleLifeCycleExceptionpublic String ip()
RemotingServerip 在接口中 RemotingServerpublic int port()
RemotingServerport 在接口中 RemotingServerprotected void setLocalBindingPort(int port)
port - local binding portprotected abstract void doInit()
protected abstract boolean doStart()
throws InterruptedException
protected abstract boolean doStop()
public <T> T option(BoltOption<T> option)
Configurableoption 在接口中 Configurableoption - target optionpublic <T> Configurable option(BoltOption<T> option, T value)
ConfigurableBoltOption which is used for the Configurable instances once they got
created. Use a value of null to remove a previous set BoltOption.option 在接口中 Configurableoption - target optionvalue - option value, null to remove the previous optionpublic ConfigContainer conf()
ConfigurableInstanceconf 在接口中 ConfigurableInstancepublic GlobalSwitch switches()
ConfigurableInstanceswitches 在接口中 ConfigurableInstancepublic void initWriteBufferWaterMark(int low,
int high)
NettyConfigureNotice: This api should be called before init remoting instance.
initWriteBufferWaterMark 在接口中 NettyConfigurelow - [0, high]high - [high, Integer.MAX_VALUE)public int netty_buffer_low_watermark()
NettyConfigurenetty_buffer_low_watermark 在接口中 NettyConfigurepublic int netty_buffer_high_watermark()
NettyConfigurenetty_buffer_high_watermark 在接口中 NettyConfigureCopyright © 2020. All rights reserved.