public class RestServerEndpointConfig extends ServerSocketEndpointConfig
RestApiConfigDEFAULT_PORT, PORT_AUTO_INCREMENTDEFAULT_SOCKET_CONNECT_TIMEOUT_SECONDS, DEFAULT_SOCKET_LINGER_SECONDS, DEFAULT_SOCKET_RECEIVE_BUFFER_SIZE_KB, DEFAULT_SOCKET_SEND_BUFFER_SIZE_KB, interfaces, name, protocolType, socketInterceptorConfig, sslConfig, symmetricEncryptionConfig| Constructor and Description |
|---|
RestServerEndpointConfig() |
getPort, getPortCount, getPublicAddress, isPortAutoIncrement, isReuseAddress, setPortCount, setProtocolTypegetInterfaces, getName, getOutboundPortDefinitions, getOutboundPorts, getSocketConnectTimeoutSeconds, getSocketInterceptorConfig, getSocketLingerSeconds, getSocketRcvBufferSizeKb, getSocketSendBufferSizeKb, getSSLConfig, getSymmetricEncryptionConfig, isSocketBufferDirect, isSocketKeepAlive, isSocketTcpNoDelaypublic final com.hazelcast.instance.ProtocolType getProtocolType()
getProtocolType in class EndpointConfigpublic com.hazelcast.instance.EndpointQualifier getQualifier()
getQualifier in class EndpointConfigpublic RestServerEndpointConfig enableAllGroups()
public RestServerEndpointConfig enableGroups(RestEndpointGroup... endpointGroups)
public RestServerEndpointConfig disableAllGroups()
public RestServerEndpointConfig disableGroups(RestEndpointGroup... endpointGroups)
public boolean isEnabledAndNotEmpty()
public Set<RestEndpointGroup> getEnabledGroups()
null set of enabled REST endpoint groups.public boolean isGroupEnabled(RestEndpointGroup group)
true even if the REST API itself is disabled.public RestServerEndpointConfig setEnabledGroups(Collection<RestEndpointGroup> groups)
public RestServerEndpointConfig setPublicAddress(String publicAddress)
ServerSocketEndpointConfigsetPublicAddress in class ServerSocketEndpointConfigpublic RestServerEndpointConfig setPort(int port)
ServerSocketEndpointConfigsetPort in class ServerSocketEndpointConfigport - the port the Hazelcast member will try to bind onServerSocketEndpointConfig.getPort(),
for more informationpublic RestServerEndpointConfig setPortAutoIncrement(boolean portAutoIncrement)
ServerSocketEndpointConfig
If you explicitly want to control the port a Hazelcast member is going to use, you probably want to set
portAutoincrement to false. In this case, the Hazelcast member is going to try the port ServerSocketEndpointConfig.setPort(int)
and if the port is not free, the member will not start and throw an exception.
If this value is set to true, Hazelcast will start at the port specified by ServerSocketEndpointConfig.setPort(int) and will try
until it finds a free port, or until it runs out of ports to try ServerSocketEndpointConfig.setPortCount(int).
setPortAutoIncrement in class ServerSocketEndpointConfigportAutoIncrement - the portAutoIncrement to setServerSocketEndpointConfig.isPortAutoIncrement(),
ServerSocketEndpointConfig.setPortCount(int),
ServerSocketEndpointConfig.setPort(int)public RestServerEndpointConfig setReuseAddress(boolean reuseAddress)
ServerSocketEndpointConfigWhen should setReuseAddress(true) be used?
When the member is shutdown, the server socket port will be in TIME_WAIT state for the next 2 minutes or so. If you start the member right after shutting it down, you may not be able to bind to the same port because it is in TIME_WAIT state. if you set reuseAddress=true then TIME_WAIT will be ignored and you will be able to bind to the same port again.
This property should not be set to true on the Windows platform: see
setReuseAddress in class ServerSocketEndpointConfigpublic RestServerEndpointConfig setName(String name)
setName in interface NamedConfigsetName in class ServerSocketEndpointConfigpublic RestServerEndpointConfig setOutboundPortDefinitions(Collection<String> outboundPortDefs)
setOutboundPortDefinitions in class ServerSocketEndpointConfigpublic RestServerEndpointConfig setOutboundPorts(Collection<Integer> outboundPorts)
setOutboundPorts in class ServerSocketEndpointConfigpublic RestServerEndpointConfig setInterfaces(InterfacesConfig interfaces)
setInterfaces in class ServerSocketEndpointConfiginterfaces - the interfaces to setpublic RestServerEndpointConfig setSocketBufferDirect(boolean socketBufferDirect)
setSocketBufferDirect in class ServerSocketEndpointConfigpublic RestServerEndpointConfig setSocketKeepAlive(boolean socketKeepAlive)
setSocketKeepAlive in class ServerSocketEndpointConfigpublic RestServerEndpointConfig setSocketTcpNoDelay(boolean socketTcpNoDelay)
setSocketTcpNoDelay in class ServerSocketEndpointConfigpublic RestServerEndpointConfig setSocketSendBufferSizeKb(int socketSendBufferSizeKb)
setSocketSendBufferSizeKb in class ServerSocketEndpointConfigpublic RestServerEndpointConfig setSocketRcvBufferSizeKb(int socketRcvBufferSizeKb)
setSocketRcvBufferSizeKb in class ServerSocketEndpointConfigpublic RestServerEndpointConfig setSocketLingerSeconds(int socketLingerSeconds)
setSocketLingerSeconds in class ServerSocketEndpointConfigpublic RestServerEndpointConfig setSocketConnectTimeoutSeconds(int socketConnectTimeoutSeconds)
setSocketConnectTimeoutSeconds in class ServerSocketEndpointConfigpublic RestServerEndpointConfig setSocketInterceptorConfig(SocketInterceptorConfig socketInterceptorConfig)
EndpointConfigSocketInterceptorConfig. The value can be null if no socket interception is needed.setSocketInterceptorConfig in class ServerSocketEndpointConfigsocketInterceptorConfig - the SocketInterceptorConfig to setpublic RestServerEndpointConfig setSSLConfig(SSLConfig sslConfig)
EndpointConfigSSLConfig. null value indicates that no SSLConfig should be used.setSSLConfig in class ServerSocketEndpointConfigsslConfig - the SSLConfigEndpointConfig.getSSLConfig()public RestServerEndpointConfig setSymmetricEncryptionConfig(SymmetricEncryptionConfig symmetricEncryptionConfig)
EndpointConfigSymmetricEncryptionConfig. The value can be null if no symmetric encryption should be used.setSymmetricEncryptionConfig in class ServerSocketEndpointConfigsymmetricEncryptionConfig - the SymmetricEncryptionConfig to setEndpointConfig.getSymmetricEncryptionConfig()public RestServerEndpointConfig addOutboundPortDefinition(String portDef)
addOutboundPortDefinition in class EndpointConfigpublic RestServerEndpointConfig addOutboundPort(int port)
addOutboundPort in class EndpointConfigpublic String toString()
toString in class ServerSocketEndpointConfigCopyright © 2020 Hazelcast, Inc.. All rights reserved.