public abstract class AbstractRemotingServer extends AbstractLifeCycle implements RemotingServer, ConfigurableInstance
| Constructor and Description |
|---|
AbstractRemotingServer(int port) |
AbstractRemotingServer(String ip,
int port) |
| Modifier and Type | Method and Description |
|---|---|
ConfigContainer |
conf()
Deprecated.
|
protected abstract void |
doInit() |
protected abstract boolean |
doStart() |
protected abstract boolean |
doStop() |
void |
init()
Deprecated.
|
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
deprecated, use instance#option(BoltClientOption.NETTY_BUFFER_HIGH_WATER_MARK) instead
|
int |
netty_buffer_low_watermark()
get the low water mark for netty write buffer
deprecated, use instance#option(BoltClientOption.NETTY_BUFFER_LOW_WATER_MARK) instead
|
<T> T |
option(BoltOption<T> option)
Get the option value.
|
<T> Configuration |
option(BoltOption<T> option,
T value)
Allow to specify a
BoltOption which is used for the Configuration 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()
Deprecated.
|
void |
startup() |
boolean |
stop()
Deprecated.
|
GlobalSwitch |
switches()
Deprecated.
|
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 in interface RemotingServer@Deprecated public boolean start()
RemotingServerstart in interface RemotingServer@Deprecated public boolean stop()
RemotingServerstop in interface RemotingServerpublic void startup()
throws LifeCycleException
startup in interface LifeCyclestartup in class AbstractLifeCycleLifeCycleExceptionpublic void shutdown()
throws LifeCycleException
shutdown in interface LifeCycleshutdown in class AbstractLifeCycleLifeCycleExceptionpublic String ip()
RemotingServerip in interface RemotingServerpublic int port()
RemotingServerport in interface RemotingServerprotected void setLocalBindingPort(int port)
port - local binding portprotected abstract void doInit()
protected abstract boolean doStart()
throws InterruptedException
InterruptedExceptionprotected abstract boolean doStop()
public <T> T option(BoltOption<T> option)
Configurationoption in interface Configurationoption - target optionpublic <T> Configuration option(BoltOption<T> option, T value)
ConfigurationBoltOption which is used for the Configuration instances once they got
created. Use a value of null to remove a previous set BoltOption.option in interface Configurationoption - target optionvalue - option value, null to remove the previous option@Deprecated public ConfigContainer conf()
ConfigurableInstanceconf in interface ConfigurableInstance@Deprecated public GlobalSwitch switches()
ConfigurableInstanceswitches in interface ConfigurableInstancepublic void initWriteBufferWaterMark(int low,
int high)
ConfigurableInstanceNotice: This api should be called before init remoting instance. deprecated, use option() instead: instance#option(BoltOption.NETTY_BUFFER_LOW_WATER_MARK, low); instance#option(BoltOption.NETTY_BUFFER_HIGH_WATER_MARK, high);
initWriteBufferWaterMark in interface ConfigurableInstancelow - [0, high]high - [high, Integer.MAX_VALUE)public int netty_buffer_low_watermark()
ConfigurableInstancenetty_buffer_low_watermark in interface ConfigurableInstancepublic int netty_buffer_high_watermark()
ConfigurableInstancenetty_buffer_high_watermark in interface ConfigurableInstanceCopyright © 2024. All rights reserved.