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:
Applies to
Azure SDK for Java