FabricTransportRemotingListenerSettings 类

定义

Settings that configures the FabricTransport Listener.

public class FabricTransportRemotingListenerSettings
继承
java.lang.Object
FabricTransportRemotingListenerSettings

构造函数

FabricTransportRemotingListenerSettings()

Creates a new instance of FabricTransportRemotingListenerSettings and initializes properties with default Values.

方法

getDefault()
getDefault(String sectionName)
getDefaultEndpointResourceName()
getEndPointResourceName()

EndpointResourceName is name of the endpoint resource specified in ServiceManifest .This is used to obtain the port number on which to service will listen.

Remarks:Default value of EndpointResourceName is "ServiceEndpoint"

getInternalSettings()
getKeepAliveTimeout()

KeepAliveTimeout is provides a way to configure Tcp keep-alive option.

Remarks:Default Value for KeepAliveTimeout Timeout is set as TimeSpan.Zero. which indicates we disable the tcp keepalive option. If you are using loadbalancer , you may need to configure this in order to avoid the loadbalancer to close the connection after certain time

getMaxConcurrentCalls()

MaxConcurrentCalls represents maximum number of messages actively service processes at one time.

Remarks:Defaults value for the MaxConcurrentCalls is to the Number of processors.

getMaxMessageSize()

MaxMessageSize represents the maximum size for a message that can be received on a channel configured with this setting.

Remarks:Default Value for MaxMessageSize used is 4194304 bytes

getMaxQueueSize()

The maximum size, of a queue that stores messages while they are processed for an endpoint configured with this setting.

Remarks:Default value is 10,000 messages

getOperationTimeout()

Operation Timeout which governs the whole process of sending a message, including receiving a reply message for a request/reply service operation. This timeout also applies when sending reply messages from a callback contract method.

Remarks:Default Value for Operation Timeout is set as TimeSpan.MaxValue

getSecurityCredentials()

Security credentials for securing the communication

Remarks: Default Value for SecurityCredentials is NoneSecurityCredentials. Can be of type X509Credentials or X509Credentials2

loadFrom(String sectionName)

Loads the FabricTransport settings from a section specified in the service settings configuration file - settings.xml

Remarks: The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - FabricTransportSettings#getMaxQueueSize()value in long. 2. MaxMessageSize - FabricTransportSettings#getMaxMessageSize()value in bytes. 3. MaxConcurrentCalls - FabricTransportSettings#getMaxConcurrentCalls()value in long. 4. SecurityCredentials - FabricTransportSettings#getSecurityCredentials() value. 5. OperationTimeoutInSeconds - FabricTransportSettings#getOperationTimeout() value in seconds. 6. KeepAliveTimeoutInSeconds - FabricTransportSettings#getKeepAliveTimeout() value in seconds.

loadFrom(String sectionName, String configPackageName)

Loads the FabricTransport settings from a section specified in the service settings configuration file - settings.xml

Remarks: The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - FabricTransportSettings#getMaxQueueSize()value in long. 2. MaxMessageSize - FabricTransportSettings#getMaxMessageSize()value in bytes. 3. MaxConcurrentCalls - FabricTransportSettings#getMaxConcurrentCalls()value in long. 4. SecurityCredentials - FabricTransportSettings#getSecurityCredentials() value. 5. OperationTimeoutInSeconds - FabricTransportSettings#getOperationTimeout() value in seconds. 6. KeepAliveTimeoutInSeconds - FabricTransportSettings#getKeepAliveTimeout() value in seconds.

setEndPointResourceName(String endPointResourceName)

EndpointResourceName is name of the endpoint resource specified in ServiceManifest .This is used to obtain the port number on which to service will listen.

Remarks:Default value of EndpointResourceName is "ServiceEndpoint"

setKeepAliveTimeout(Duration keepAliveTimeout)

KeepAliveTimeout is provides a way to configure Tcp keep-alive option.

Remarks:Default Value for KeepAliveTimeout Timeout is set as TimeSpan.Zero. which indicates we disable the tcp keepalive option. If you are using loadbalancer , you may need to configure this in order to avoid the loadbalancer to close the connection after certain time

setMaxConcurrentCalls(Long maxConcurrentCalls)

MaxConcurrentCalls represents maximum number of messages actively service processes at one time.

Remarks:Defaults value for the MaxConcurrentCalls is to the Number of processors.

setMaxMessageSize(Long maxMessageSize)

MaxMessageSize represents the maximum size for a message that can be received on a channel configured with this setting.

Remarks:Default Value for MaxMessageSize used is 4194304 bytes

setMaxQueueSize(Long maxQueueSize)

The maximum size, of a queue that stores messages while they are processed for an endpoint configured with this setting.

Remarks:Default value is 10,000 messages

setOperationTimeout(Duration operationTimeout)

Operation Timeout which governs the whole process of sending a message, including receiving a reply message for a request/reply service operation. This timeout also applies when sending reply messages from a callback contract method.

Remarks:Default Value for Operation Timeout is set as TimeSpan.MaxValue

setSecurityCredentials(SecurityCredentials securityCredentials)

Security credentials for securing the communication

tryLoadFrom(String sectionName)

Try to load the FabricTransport settings from a section specified in the service settings configuration file - settings.xml

Remarks: The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - FabricTransportSettings#getMaxQueueSize()value in long. 2. MaxMessageSize - FabricTransportSettings#getMaxMessageSize()value in bytes. 3. MaxConcurrentCalls - FabricTransportSettings#getMaxConcurrentCalls()value in long. 4. SecurityCredentials - FabricTransportSettings#getSecurityCredentials() value. 5. OperationTimeoutInSeconds - FabricTransportSettings#getOperationTimeout() value in seconds. 6. KeepAliveTimeoutInSeconds - FabricTransportSettings#getKeepAliveTimeout() value in seconds.

tryLoadFrom(String sectionName, String configPackageName)

Try to load the FabricTransport settings from a section specified in the service settings configuration file - settings.xml

Remarks: The following are the parameter names that should be provided in the configuration file,to be recognizable by service fabric to load the transport settings. 1. MaxQueueSize - FabricTransportSettings#getMaxQueueSize()value in long. 2. MaxMessageSize - FabricTransportSettings#getMaxMessageSize()value in bytes. 3. MaxConcurrentCalls - FabricTransportSettings#getMaxConcurrentCalls()value in long. 4. SecurityCredentials - FabricTransportSettings#getSecurityCredentials() value. 5. OperationTimeoutInSeconds - FabricTransportSettings#getOperationTimeout() value in seconds. 6. KeepAliveTimeoutInSeconds - FabricTransportSettings#getKeepAliveTimeout() value in seconds.

适用于