org.wildfly.clustering.singleton.Singleton 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 java.util.Set;
import org.wildfly.clustering.group.Node;
/**
* @author Paul Ferraro
*/
public interface Singleton {
/**
* Indicates whether this node is the primary provider of the singleton.
* @return true, if this node is the primary node, false if it is a backup node.
*/
boolean isPrimary();
/**
* Returns the current primary provider of the singleton.
* @return a cluster member
*/
Node getPrimaryProvider();
/**
* Returns the providers on which the given singleton is available.
* @return a set of cluster members
*/
Set getProviders();
}