你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

FabricTransportActorRemotingProvider Class

  • java.lang.Object
    • ActorRemotingProvider
      • microsoft.servicefabric.actors.remoting.fabrictransport.FabricTransportActorRemotingProvider

public class FabricTransportActorRemotingProvider

Sets fabric TCP transport as the default remoting provider for the actors.

Method Summary

Modifier and Type Method and Description
ServiceRemotingClientFactory createServiceRemotingClientFactory(ServiceRemotingCallbackClient callbackClient)

Creates a service remoting client factory to connect to the remoted actor interfaces.

ServiceRemotingListener createServiceRemotingListener(FabricActorService actorService)

Creates a service remoting listener for remoting the actor interfaces.

long getConnectTimeoutInMilliseconds()

Gets the connect timeout in milliseconds. This settings specifies the maximum time allowed for the connection to be established.

long getKeepAliveTimeoutInSeconds()

Gets the keep alive timeout in seconds. This settings is useful in the scenario when the client and service are connected via load balancer that closes the connection if it is idle for some time. If keep alive timeout is configured, the connection will be kept alive by sending ping messages at that interval.

long getMaxMessageSize()

Gets the maximum size of the remoting message in bytes.

long getOperationTimeoutInSeconds()

Sets the operation timeout in seconds. If the operation is not completed in the specified time, it will be timed out. By default, exception handler of FabricTransportServiceRemotingClientFactory retries the timed out exception. It is recommended to not change the operation timeout from it's default value.

void setConnectTimeoutInMilliseconds(long connectTimeoutInMilliseconds)

Sets the connect timeout in milliseconds. This settings specifies the maximum time allowed for the connection to be established.

void setKeepAliveTimeoutInSeconds(long keepAliveTimeoutInSeconds)

Sets the keep alive timeout in seconds. This settings is useful in the scenario when the client and service are connected via load balancer that closes the connection if it is idle for some time. If keep alive timeout is configured, the connection will be kept alive by sending ping messages at that interval.

void setMaxMessageSize(long maxMessageSize)

Sets the maximum size of the remoting message in bytes. If value for this property is not specified or it is less than or equals to zero, a default value of 4,194,304 bytes (4 MB) is used.

void setOperationTimeoutInSeconds(long operationTimeoutInSeconds)

Sets the operation timeout in seconds. If the operation is not completed in the specified time, it will be timed out. By default, exception handler of FabricTransportServiceRemotingClientFactory retries the timed out exception. It is recommended to not change the operation timeout from it's default value.

Method Details

createServiceRemotingClientFactory

public ServiceRemotingClientFactory createServiceRemotingClientFactory(ServiceRemotingCallbackClient callbackClient)

Creates a service remoting client factory to connect to the remoted actor interfaces.

Parameters:

callbackClient - Client implementation where the callbacks should be dispatched.

Returns:

A FabricTransportActorRemotingClientFactory as ServiceRemotingClientFactory that can be used with ActorProxyFactory to generate actor proxy to talk to the actor over remoted actor interface.

createServiceRemotingListener

public ServiceRemotingListener createServiceRemotingListener(FabricActorService actorService)

Creates a service remoting listener for remoting the actor interfaces.

Parameters:

actorService - The implementation of the actor service that hosts the actors whose interfaces needs to be remoted.

Returns:

getConnectTimeoutInMilliseconds

public long getConnectTimeoutInMilliseconds()

Gets the connect timeout in milliseconds. This settings specifies the maximum time allowed for the connection to be established.

Returns:

The connect timeout in Milliseconds.

getKeepAliveTimeoutInSeconds

public long getKeepAliveTimeoutInSeconds()

Gets the keep alive timeout in seconds. This settings is useful in the scenario when the client and service are connected via load balancer that closes the connection if it is idle for some time. If keep alive timeout is configured, the connection will be kept alive by sending ping messages at that interval.

Returns:

The keep alive timeout in seconds.

getMaxMessageSize

public long getMaxMessageSize()

Gets the maximum size of the remoting message in bytes.

Returns:

The maximum size of the remoting message in bytes.

getOperationTimeoutInSeconds

public long getOperationTimeoutInSeconds()

Sets the operation timeout in seconds. If the operation is not completed in the specified time, it will be timed out. By default, exception handler of FabricTransportServiceRemotingClientFactory retries the timed out exception. It is recommended to not change the operation timeout from it's default value.

Returns:

The operation timeout in seconds. If not specified or less than zero, default operation timeout of maximum value is used.

setConnectTimeoutInMilliseconds

public void setConnectTimeoutInMilliseconds(long connectTimeoutInMilliseconds)

Sets the connect timeout in milliseconds. This settings specifies the maximum time allowed for the connection to be established.

Parameters:

connectTimeoutInMilliseconds - The connect timeout in Milliseconds.

setKeepAliveTimeoutInSeconds

public void setKeepAliveTimeoutInSeconds(long keepAliveTimeoutInSeconds)

Sets the keep alive timeout in seconds. This settings is useful in the scenario when the client and service are connected via load balancer that closes the connection if it is idle for some time. If keep alive timeout is configured, the connection will be kept alive by sending ping messages at that interval.

Parameters:

keepAliveTimeoutInSeconds - The keep alive timeout in seconds.

setMaxMessageSize

public void setMaxMessageSize(long maxMessageSize)

Sets the maximum size of the remoting message in bytes. If value for this property is not specified or it is less than or equals to zero, a default value of 4,194,304 bytes (4 MB) is used.

Parameters:

maxMessageSize - The maximum size of the remoting message in bytes. If this value is not specified or it is less than or equals to zero, a default value of 4,194,304 bytes (4 MB) is used.

setOperationTimeoutInSeconds

public void setOperationTimeoutInSeconds(long operationTimeoutInSeconds)

Sets the operation timeout in seconds. If the operation is not completed in the specified time, it will be timed out. By default, exception handler of FabricTransportServiceRemotingClientFactory retries the timed out exception. It is recommended to not change the operation timeout from it's default value.

Parameters:

operationTimeoutInSeconds - The operation timeout in seconds. If not specified or less than zero, default operation timeout of maximum value is used.

Applies to