All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.wildfly.clustering.singleton.Singleton Maven / Gradle / Ivy

There is a newer version: 34.0.1.Final
Show newest version
/*
 * 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();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy