org.wildfly.clustering.singleton.SingletonServiceBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wildfly-clustering-singleton-api Show documentation
Show all versions of wildfly-clustering-singleton-api Show documentation
Public API for installing singleton MSC services.
/*
* Copyright The WildFly Authors
* SPDX-License-Identifier: Apache-2.0
*/
package org.wildfly.clustering.singleton;
import org.wildfly.clustering.service.Builder;
import org.wildfly.clustering.singleton.service.SingletonServiceConfigurator;
/**
* Builds a singleton service.
* @author Paul Ferraro
* @param the singleton service value type
* @deprecated Replaced by {@link SingletonServiceConfigurator}.
*/
@Deprecated(forRemoval = true)
public interface SingletonServiceBuilder extends Builder {
/**
* Defines the minimum number of members required before a singleton election will take place.
* @param quorum the quorum required for electing a primary singleton provider
* @return a reference to this builder
*/
SingletonServiceBuilder requireQuorum(int quorum);
/**
* Defines the policy for electing a primary singleton provider.
* @param policy an election policy
* @return a reference to this builder
*/
SingletonServiceBuilder electionPolicy(SingletonElectionPolicy policy);
/**
* Defines a listener to trigger following the election of a primary singleton provider.
* @param listener an election listener
* @return a reference to this builder
*/
SingletonServiceBuilder electionListener(SingletonElectionListener listener);
}