public class RestServerEndpointConfig extends ServerSocketEndpointConfig
RestApiConfig
DEFAULT_PORT, PORT_AUTO_INCREMENT
DEFAULT_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, setProtocolType
getInterfaces, getName, getOutboundPortDefinitions, getOutboundPorts, getSocketConnectTimeoutSeconds, getSocketInterceptorConfig, getSocketKeepCount, getSocketKeepIdleSeconds, getSocketKeepIntervalSeconds, getSocketLingerSeconds, getSocketRcvBufferSizeKb, getSocketSendBufferSizeKb, getSSLConfig, getSymmetricEncryptionConfig, getTpcSocketConfig, 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
A 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 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()
@Beta @Nonnull public RestServerEndpointConfig setTpcSocketConfig(@Nonnull TpcSocketConfig tpcSocketConfig)
EndpointConfig
setTpcSocketConfig
in class ServerSocketEndpointConfig
tpcSocketConfig
- Tpc socket config to setTpcConfig
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 RestServerEndpointConfig setSocketKeepIdleSeconds(int socketKeepIdleSeconds)
EndpointConfig
keep alive is true
.
Requires a recent JDK 8, JDK 11 or greater version that includes the required
JDK support.setSocketKeepIdleSeconds
in class ServerSocketEndpointConfig
public RestServerEndpointConfig setSocketKeepIntervalSeconds(int socketKeepIntervalSeconds)
EndpointConfig
keep-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 ServerSocketEndpointConfig
public RestServerEndpointConfig setSocketKeepCount(int socketKeepCount)
EndpointConfig
keep alive is true
.
Requires a recent JDK 8, JDK 11 or greater version that includes the required
JDK support.setSocketKeepCount
in class ServerSocketEndpointConfig
public String toString()
toString
in class ServerSocketEndpointConfig
public boolean equals(Object o)
equals
in class ServerSocketEndpointConfig
public int hashCode()
hashCode
in class ServerSocketEndpointConfig
Copyright © 2024 Hazelcast, Inc.. All rights reserved.