Compartir a través de


ActorNameFormat Class

  • java.lang.Object
    • microsoft.servicefabric.actors.ActorNameFormat

public class ActorNameFormat

Contains static methods for generating names like service name, application name form the actor interface type.

Method Summary

Modifier and Type Method and Description
String getConfigPackageName(Class<?> actorImplementationType)

Gets the configuration package name used in service package for the actor.

String getFabricServiceEndpointName(Class<?> actorImplementationType)

Gets the service endpoint for the actor type which is specified in service manifest for the actor service.

String getFabricServiceName(Class<?> actorInterfaceType, String serviceName)

Gets name of service which hosts the actor type in Service Fabric cluster.

String getFabricServiceReplicatorConfigSectionName(Class<?> actorImplementationType)

Gets the replicator configuration section name specified in configuration package for the actor service.

Remarks: Values specified in replicator configuration section are used to configure ReplicatorSettings for the replication of actor state between primary and secondary replicas.

String getFabricServiceReplicatorEndpointName(Class<?> actorImplementationType)

Gets the replicator endpoint which is specified in service manifest for the actor service.

String getFabricServiceReplicatorSecurityConfigSectionName(Class<?> actorImplementationType)

Gets the replicator security configuration section name specified in configuration package for the actor service.

Remarks: Values specified in replicator security configuration section are used to configure system.fabric.ReplicatorSettings#securityCredentials for the replication of actor state between primary and secondary replicas.

String getFabricServiceTransportSettingsSectionName(Class<?> actorImplementationType)

Gets the fabrictransport configuration section name specified in configuration package for the actor service.

Remarks:Values specified in FabricTransport configuration section are used to configure microsoft.servicefabric.fabrictransport.runtime.FabricTransportListenerSettings for the communication.

String getFabricServiceTypeName(Class<?> actorImplementationType)

Gets service type name for the actor.

URI getFabricServiceUri(Class<?> actorInterfaceType, String applicationName, String serviceName)

Gets service Uri which hosts the actor type in Service Fabric cluster.

Remarks: If applicationName is passed as null or empty string, an attempt is made to get application name from CodePackageActivationContext. If the method still cannot determine application name, java.lang.IllegalArgumentException is thrown.

URI getFabricServiceUri(Class<?> actorInterfaceType, URI applicationUri, String serviceName)

Gets service Uri which hosts the actor type in Service Fabric cluster.

Remarks: If applicationUri is passed as null or empty string, an attempt is made to get application name from CodePackageActivationContext. If the method still cannot determine application name, java.lang.IllegalArgumentException is thrown.

String getName(Class<?> actorInterfaceType)

Gets name of Actor from actorInterfaceType.

Method Details

getConfigPackageName

public static String getConfigPackageName(Class actorImplementationType)

Gets the configuration package name used in service package for the actor.

Parameters:

actorImplementationType - Type of class implementing the actor.

Returns:

configuration package name.

getFabricServiceEndpointName

public static String getFabricServiceEndpointName(Class actorImplementationType)

Gets the service endpoint for the actor type which is specified in service manifest for the actor service.

Parameters:

actorImplementationType - Type of class implementing the actor.

Returns:

Service endpoint name.

getFabricServiceName

public static String getFabricServiceName(Class actorInterfaceType, String serviceName)

Gets name of service which hosts the actor type in Service Fabric cluster.

Parameters:

actorInterfaceType - Type of the actor interface.
serviceName - Name of service hosting the actor type. If this value is null then service name is constructed using the actorInterfaceType.

Returns:

Service Fabric service name hosting the actor type.

getFabricServiceReplicatorConfigSectionName

public static String getFabricServiceReplicatorConfigSectionName(Class actorImplementationType)

Gets the replicator configuration section name specified in configuration package for the actor service.

Remarks: Values specified in replicator configuration section are used to configure ReplicatorSettings for the replication of actor state between primary and secondary replicas.

Parameters:

actorImplementationType - Type of class implementing the actor.

Returns:

Replicator configuration section name.

getFabricServiceReplicatorEndpointName

public static String getFabricServiceReplicatorEndpointName(Class actorImplementationType)

Gets the replicator endpoint which is specified in service manifest for the actor service.

Parameters:

actorImplementationType - Type of class implementing the actor.

Returns:

Service replicator endpoint name.

getFabricServiceReplicatorSecurityConfigSectionName

public static String getFabricServiceReplicatorSecurityConfigSectionName(Class actorImplementationType)

Gets the replicator security configuration section name specified in configuration package for the actor service.

Remarks: Values specified in replicator security configuration section are used to configure system.fabric.ReplicatorSettings#securityCredentials for the replication of actor state between primary and secondary replicas.

Parameters:

actorImplementationType - Type of class implementing the actor.

Returns:

Replicator security configuration section name.

getFabricServiceTransportSettingsSectionName

public static String getFabricServiceTransportSettingsSectionName(Class actorImplementationType)

Gets the fabrictransport configuration section name specified in configuration package for the actor service.

Remarks:Values specified in FabricTransport configuration section are used to configure microsoft.servicefabric.fabrictransport.runtime.FabricTransportListenerSettings for the communication.

Parameters:

actorImplementationType - Type of class implementing the actor.

Returns:

FabricTransport configuration section name.

getFabricServiceTypeName

public static String getFabricServiceTypeName(Class actorImplementationType)

Gets service type name for the actor.

Parameters:

actorImplementationType - Actor implementation type.

Returns:

Service type name.

getFabricServiceUri

public static URI getFabricServiceUri(Class actorInterfaceType, String applicationName, String serviceName)

Gets service Uri which hosts the actor type in Service Fabric cluster.

Remarks: If applicationName is passed as null or empty string, an attempt is made to get application name from CodePackageActivationContext. If the method still cannot determine application name, java.lang.IllegalArgumentException is thrown.

Parameters:

actorInterfaceType - Type of the actor interface.
applicationName - Service Fabric application name containing the actor service. If this value is null application name is obtained from getApplicationName()
serviceName - Name of service hosting the actor type. If this value is null then service name is constructed using the actorInterfaceType.

Returns:

Service Fabric service Uri hosting the actor type.

Throws:

java.net.URISyntaxException - Throws URISyntaxException
IllegalArgumentException - When applicationName cannot be determined using CodePackageActivationContext.

getFabricServiceUri

public static URI getFabricServiceUri(Class actorInterfaceType, URI applicationUri, String serviceName)

Gets service Uri which hosts the actor type in Service Fabric cluster.

Remarks: If applicationUri is passed as null or empty string, an attempt is made to get application name from CodePackageActivationContext. If the method still cannot determine application name, java.lang.IllegalArgumentException is thrown.

Parameters:

actorInterfaceType - Type of the actor interface.
applicationUri - Service Fabric application Uri containing the actor service. If this value is null application name is obtained from getApplicationName()
serviceName - Name of service hosting the actor type. If this value is null then service name is constructed using the actorInterfaceType.

Returns:

Service Fabric service Uri hosting the actor type.

Throws:

java.net.URISyntaxException - Throws URISyntaxException
IllegalArgumentException - When applicationUri cannot be determined using CodePackageActivationContext.

getName

public static String getName(Class actorInterfaceType)

Gets name of Actor from actorInterfaceType.

Parameters:

actorInterfaceType - Type of the actor interface.

Returns:

Name of Actor.

Applies to