你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
ServiceReplicaListener Class
- java.
lang. Object - microsoft.
servicefabric. services. communication. runtime. ServiceReplicaListener
- microsoft.
public class ServiceReplicaListener
Represents the communication listener and its properties for a Stateful Service Replica. Endpoints given out by the communication listener are associated with name of the communication listener.
Field Summary
Modifier and Type | Field and Description |
---|---|
final String |
defaultName
The default name used when the ServiceReplicaListener is not given a name. |
Constructor Summary
Method Summary
Modifier and Type | Method and Description |
---|---|
Function<Stateful |
createCommunicationListener()
Factory method for creating the communication listener. |
boolean |
listenOnSecondary()
Indicates if this communication listener should be opened when the stateful service replica becomes an ActiveSecondary. When this member is not set(or set to false), the communication listener is opened only when the replica becomes Primary. |
String |
name()
Name of the communication listener. |
Field Details
defaultName
public static final String defaultName= ""
The default name used when the ServiceReplicaListener is not given a name.
Constructor Details
ServiceReplicaListener
public ServiceReplicaListener(Function
Parameters:
ServiceReplicaListener
public ServiceReplicaListener(Function
Creates the ServiceReplicaListener
Parameters:
ServiceReplicaListener
public ServiceReplicaListener(Function
Parameters:
Method Details
createCommunicationListener
public Function
Factory method for creating the communication listener.
Returns:
listenOnSecondary
public boolean listenOnSecondary()
Indicates if this communication listener should be opened when the stateful service replica becomes an ActiveSecondary. When this member is not set(or set to false), the communication listener is opened only when the replica becomes Primary.
Returns:
name
public String name()
Name of the communication listener.
Returns: