public class RestServerEndpointConfig extends ServerSocketEndpointConfig
RestApiConfigDEFAULT_PORT, PORT_AUTO_INCREMENTDEFAULT_SOCKET_CONNECT_TIMEOUT_SECONDS, DEFAULT_SOCKET_KEEP_COUNT, DEFAULT_SOCKET_KEEP_IDLE_SECONDS, DEFAULT_SOCKET_KEEP_INTERVAL_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() |
| Modifier and Type | Method and Description |
|---|---|
RestServerEndpointConfig |
addOutboundPort(int port) |
RestServerEndpointConfig |
addOutboundPortDefinition(String portDef) |
RestServerEndpointConfig |
disableAllGroups()
Disables all REST endpoint groups.
|
RestServerEndpointConfig |
disableGroups(RestEndpointGroup... endpointGroups)
Disables provided REST endpoint groups.
|
RestServerEndpointConfig |
enableAllGroups()
Enables all REST endpoint groups.
|
RestServerEndpointConfig |
enableGroups(RestEndpointGroup... endpointGroups)
Enables provided REST endpoint groups.
|
boolean |
equals(Object o) |
Set<RestEndpointGroup> |
getEnabledGroups()
Returns a not-
null set of enabled REST endpoint groups. |
com.hazelcast.instance.ProtocolType |
getProtocolType() |
com.hazelcast.instance.EndpointQualifier |
getQualifier() |
int |
hashCode() |
boolean |
isEnabledAndNotEmpty()
Return true if the REST API is enabled and at least one REST endpoint group is allowed.
|
boolean |
isGroupEnabled(RestEndpointGroup group)
Checks if given REST endpoint group is enabled.
|
RestServerEndpointConfig |
setEnabledGroups(Collection<RestEndpointGroup> groups) |
RestServerEndpointConfig |
setInterfaces(InterfacesConfig interfaces) |
RestServerEndpointConfig |
setName(String name) |
RestServerEndpointConfig |
setOutboundPortDefinitions(Collection<String> outboundPortDefs) |
RestServerEndpointConfig |
setOutboundPorts(Collection<Integer> outboundPorts) |
RestServerEndpointConfig |
setPort(int port)
Sets the port the Hazelcast member will try to bind on.
|
RestServerEndpointConfig |
setPortAutoIncrement(boolean portAutoIncrement)
Sets if a Hazelcast member is allowed to find a free port by incrementing the port number when it encounters
an occupied port.
|
RestServerEndpointConfig |
setPublicAddress(String publicAddress)
Overrides the public address of a member.
|
RestServerEndpointConfig |
setReuseAddress(boolean reuseAddress)
Sets the reuse address.
|
RestServerEndpointConfig |
setSocketBufferDirect(boolean socketBufferDirect) |
RestServerEndpointConfig |
setSocketConnectTimeoutSeconds(int socketConnectTimeoutSeconds) |
RestServerEndpointConfig |
setSocketInterceptorConfig(SocketInterceptorConfig socketInterceptorConfig)
Sets the
SocketInterceptorConfig. |
RestServerEndpointConfig |
setSocketKeepAlive(boolean socketKeepAlive) |
RestServerEndpointConfig |
setSocketKeepCount(int socketKeepCount)
Set the maximum number of TCP keep-alive probes to send before giving up and closing the connection if no
response is obtained from the other side.
|
RestServerEndpointConfig |
setSocketKeepIdleSeconds(int socketKeepIdleSeconds)
Set the number of seconds a connection needs to be idle before TCP begins sending out keep-alive probes.
|
RestServerEndpointConfig |
setSocketKeepIntervalSeconds(int socketKeepIntervalSeconds)
Set the number of seconds between keep-alive probes.
|
RestServerEndpointConfig |
setSocketLingerSeconds(int socketLingerSeconds) |
RestServerEndpointConfig |
setSocketRcvBufferSizeKb(int socketRcvBufferSizeKb) |
RestServerEndpointConfig |
setSocketSendBufferSizeKb(int socketSendBufferSizeKb) |
RestServerEndpointConfig |
setSocketTcpNoDelay(boolean socketTcpNoDelay) |
RestServerEndpointConfig |
setSSLConfig(SSLConfig sslConfig)
Sets the
SSLConfig. |
RestServerEndpointConfig |
setSymmetricEncryptionConfig(SymmetricEncryptionConfig symmetricEncryptionConfig)
Sets the
SymmetricEncryptionConfig. |
RestServerEndpointConfig |
setTpcSocketConfig(TpcSocketConfig tpcSocketConfig)
Sets the TpcSocketConfig.
|
String |
toString() |
getPort, getPortCount, getPublicAddress, isPortAutoIncrement, isReuseAddress, setPortCount, setProtocolTypegetInterfaces, getName, getOutboundPortDefinitions, getOutboundPorts, getSocketConnectTimeoutSeconds, getSocketInterceptorConfig, getSocketKeepCount, getSocketKeepIdleSeconds, getSocketKeepIntervalSeconds, getSocketLingerSeconds, getSocketRcvBufferSizeKb, getSocketSendBufferSizeKb, getSSLConfig, getSymmetricEncryptionConfig, getTpcSocketConfig, 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)
ServerSocketEndpointConfigA valid port value is between 0 and 65535. A port number of 0 will let the system pick up an ephemeral port.
setPort 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()@Beta @Nonnull public RestServerEndpointConfig setTpcSocketConfig(@Nonnull TpcSocketConfig tpcSocketConfig)
EndpointConfigsetTpcSocketConfig in class ServerSocketEndpointConfigtpcSocketConfig - Tpc socket config to setTpcConfigpublic 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 RestServerEndpointConfig setSocketKeepIdleSeconds(int socketKeepIdleSeconds)
EndpointConfigkeep alive is true.
Requires a recent JDK 8, JDK 11 or greater version that includes the required
JDK support.setSocketKeepIdleSeconds in class ServerSocketEndpointConfigpublic RestServerEndpointConfig setSocketKeepIntervalSeconds(int socketKeepIntervalSeconds)
EndpointConfigkeep-alive idle time has passed.
Valid values are 1 to 32767.
This option is only applicable when keep alive is true.
Requires a recent JDK 8, JDK 11 or greater version that includes the required
JDK support.setSocketKeepIntervalSeconds in class ServerSocketEndpointConfigpublic RestServerEndpointConfig setSocketKeepCount(int socketKeepCount)
EndpointConfigkeep alive is true.
Requires a recent JDK 8, JDK 11 or greater version that includes the required
JDK support.setSocketKeepCount in class ServerSocketEndpointConfigpublic String toString()
toString in class ServerSocketEndpointConfigpublic boolean equals(Object o)
equals in class ServerSocketEndpointConfigpublic int hashCode()
hashCode in class ServerSocketEndpointConfigCopyright © 2023 Hazelcast, Inc.. All rights reserved.