public class SingletonPolicy<T extends SingletonPolicy<T>> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SingletonPolicy.SingletonPolicyResources
Child mutators for SingletonPolicy
|
Constructor and Description |
---|
SingletonPolicy(String key) |
Modifier and Type | Method and Description |
---|---|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a property change listener
|
String |
cache()
The cache backing the singleton policy's singleton service.
|
T |
cache(String value)
The cache backing the singleton policy's singleton service.
|
String |
cacheContainer()
The cache container backing the singleton policy's singleton service
|
T |
cacheContainer(String value)
The cache container backing the singleton policy's singleton service
|
T |
deployment(Deployment value)
Add the Deployment object to the list of subresources
|
T |
deployment(DeploymentSupplier supplier)
Install a supplied Deployment object to the list of subresources
|
T |
deployment(String childKey)
Create and configure a Deployment object to the list of subresources
|
T |
deployment(String childKey,
DeploymentConsumer consumer)
Create and configure a Deployment object to the list of subresources
|
T |
deployments(List<Deployment> value)
Add all Deployment objects to this subresource
|
String |
getKey() |
Integer |
quorum()
The minimum number of nodes required before this singleton service will
start
|
T |
quorum(Integer value)
The minimum number of nodes required before this singleton service will
start
|
T |
randomElectionPolicy()
A random election policy
|
T |
randomElectionPolicy(RandomElectionPolicy value)
A random election policy
|
T |
randomElectionPolicy(RandomElectionPolicyConsumer consumer)
A random election policy
|
T |
randomElectionPolicy(RandomElectionPolicySupplier supplier)
A random election policy
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a property change listener
|
T |
service(Service value)
Add the Service object to the list of subresources
|
T |
service(ServiceSupplier supplier)
Install a supplied Service object to the list of subresources
|
T |
service(String childKey)
Create and configure a Service object to the list of subresources
|
T |
service(String childKey,
ServiceConsumer consumer)
Create and configure a Service object to the list of subresources
|
T |
services(List<Service> value)
Add all Service objects to this subresource
|
T |
simpleElectionPolicy()
A simple election policy
|
T |
simpleElectionPolicy(SimpleElectionPolicy value)
A simple election policy
|
T |
simpleElectionPolicy(SimpleElectionPolicyConsumer consumer)
A simple election policy
|
T |
simpleElectionPolicy(SimpleElectionPolicySupplier supplier)
A simple election policy
|
SingletonPolicy.SingletonPolicyResources |
subresources() |
public SingletonPolicy(String key)
public String getKey()
public void addPropertyChangeListener(PropertyChangeListener listener)
public void removePropertyChangeListener(PropertyChangeListener listener)
public SingletonPolicy.SingletonPolicyResources subresources()
public T services(List<Service> value)
value
- List of Service objects.public T service(Service value)
value
- The Service to addpublic T service(String childKey, ServiceConsumer consumer)
key
- The key for the Service resourceconfig
- The ServiceConsumer to usepublic T service(String childKey)
key
- The key for the Service resourcepublic T service(ServiceSupplier supplier)
public T deployments(List<Deployment> value)
value
- List of Deployment objects.public T deployment(Deployment value)
value
- The Deployment to addpublic T deployment(String childKey, DeploymentConsumer consumer)
key
- The key for the Deployment resourceconfig
- The DeploymentConsumer to usepublic T deployment(String childKey)
key
- The key for the Deployment resourcepublic T deployment(DeploymentSupplier supplier)
public T randomElectionPolicy(RandomElectionPolicy value)
public T randomElectionPolicy(RandomElectionPolicyConsumer consumer)
public T randomElectionPolicy()
public T randomElectionPolicy(RandomElectionPolicySupplier supplier)
public T simpleElectionPolicy(SimpleElectionPolicy value)
public T simpleElectionPolicy(SimpleElectionPolicyConsumer consumer)
public T simpleElectionPolicy()
public T simpleElectionPolicy(SimpleElectionPolicySupplier supplier)
public String cache()
public T cache(String value)
public String cacheContainer()
public T cacheContainer(String value)
public Integer quorum()
Copyright © 2020 JBoss by Red Hat. All rights reserved.