public class RestServerEndpointConfig extends ServerSocketEndpointConfig
RestApiConfig
DEFAULT_PORT, PORT_AUTO_INCREMENT
DEFAULT_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, setProtocolType
getInterfaces, getName, getOutboundPortDefinitions, getOutboundPorts, getSocketConnectTimeoutSeconds, getSocketInterceptorConfig, getSocketLingerSeconds, getSocketRcvBufferSizeKb, getSocketSendBufferSizeKb, getSSLConfig, getSymmetricEncryptionConfig, isSocketBufferDirect, isSocketKeepAlive, isSocketTcpNoDelay
public final com.hazelcast.instance.ProtocolType getProtocolType()
getProtocolType
in class EndpointConfig
public com.hazelcast.instance.EndpointQualifier getQualifier()
getQualifier
in class EndpointConfig
public 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)
ServerSocketEndpointConfig
setPublicAddress
in class ServerSocketEndpointConfig
public RestServerEndpointConfig setPort(int port)
ServerSocketEndpointConfig
setPort
in class ServerSocketEndpointConfig
port
- the port the Hazelcast member will try to bind onServerSocketEndpointConfig.getPort()
,
for more information
public 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 ServerSocketEndpointConfig
portAutoIncrement
- the portAutoIncrement to setServerSocketEndpointConfig.isPortAutoIncrement()
,
ServerSocketEndpointConfig.setPortCount(int)
,
ServerSocketEndpointConfig.setPort(int)
public RestServerEndpointConfig setReuseAddress(boolean reuseAddress)
ServerSocketEndpointConfig
When 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 ServerSocketEndpointConfig
public RestServerEndpointConfig setName(String name)
setName
in interface NamedConfig
setName
in class ServerSocketEndpointConfig
public RestServerEndpointConfig setOutboundPortDefinitions(Collection<String> outboundPortDefs)
setOutboundPortDefinitions
in class ServerSocketEndpointConfig
public RestServerEndpointConfig setOutboundPorts(Collection<Integer> outboundPorts)
setOutboundPorts
in class ServerSocketEndpointConfig
public RestServerEndpointConfig setInterfaces(InterfacesConfig interfaces)
setInterfaces
in class ServerSocketEndpointConfig
interfaces
- the interfaces to setpublic RestServerEndpointConfig setSocketBufferDirect(boolean socketBufferDirect)
setSocketBufferDirect
in class ServerSocketEndpointConfig
public RestServerEndpointConfig setSocketKeepAlive(boolean socketKeepAlive)
setSocketKeepAlive
in class ServerSocketEndpointConfig
public RestServerEndpointConfig setSocketTcpNoDelay(boolean socketTcpNoDelay)
setSocketTcpNoDelay
in class ServerSocketEndpointConfig
public RestServerEndpointConfig setSocketSendBufferSizeKb(int socketSendBufferSizeKb)
setSocketSendBufferSizeKb
in class ServerSocketEndpointConfig
public RestServerEndpointConfig setSocketRcvBufferSizeKb(int socketRcvBufferSizeKb)
setSocketRcvBufferSizeKb
in class ServerSocketEndpointConfig
public RestServerEndpointConfig setSocketLingerSeconds(int socketLingerSeconds)
setSocketLingerSeconds
in class ServerSocketEndpointConfig
public RestServerEndpointConfig setSocketConnectTimeoutSeconds(int socketConnectTimeoutSeconds)
setSocketConnectTimeoutSeconds
in class ServerSocketEndpointConfig
public RestServerEndpointConfig setSocketInterceptorConfig(SocketInterceptorConfig socketInterceptorConfig)
EndpointConfig
SocketInterceptorConfig
. The value can be null
if no socket interception is needed.setSocketInterceptorConfig
in class ServerSocketEndpointConfig
socketInterceptorConfig
- the SocketInterceptorConfig to setpublic RestServerEndpointConfig setSSLConfig(SSLConfig sslConfig)
EndpointConfig
SSLConfig
. null value indicates that no SSLConfig should be used.setSSLConfig
in class ServerSocketEndpointConfig
sslConfig
- the SSLConfigEndpointConfig.getSSLConfig()
public RestServerEndpointConfig setSymmetricEncryptionConfig(SymmetricEncryptionConfig symmetricEncryptionConfig)
EndpointConfig
SymmetricEncryptionConfig
. The value can be null
if no symmetric encryption should be used.setSymmetricEncryptionConfig
in class ServerSocketEndpointConfig
symmetricEncryptionConfig
- the SymmetricEncryptionConfig to setEndpointConfig.getSymmetricEncryptionConfig()
public RestServerEndpointConfig addOutboundPortDefinition(String portDef)
addOutboundPortDefinition
in class EndpointConfig
public RestServerEndpointConfig addOutboundPort(int port)
addOutboundPort
in class EndpointConfig
public String toString()
toString
in class ServerSocketEndpointConfig
Copyright © 2022 Hazelcast, Inc.. All rights reserved.