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

org.wildfly.clustering.ejb.remote.AffinitySupport Maven / Gradle / Ivy

Go to download

A set of SPIs for managing distributable @Stateful bean instances for use by the the distributed Jakarta Enterprise Beans cache implementation found in the wildfly-ejb3 module. This module decouples the mechanism for managing @Stateful bean instances from the Jakarta Enterprise Beans subsystem.

There is a newer version: 33.0.2.Final
Show newest version
/*
 * Copyright The WildFly Authors
 * SPDX-License-Identifier: Apache-2.0
 */
package org.wildfly.clustering.ejb.remote;

import org.jboss.ejb.client.Affinity;

/**
 * Defines the affinity requirements for remote clients.
 *
 * @author Paul Ferraro
 *
 * @param  the bean type
 */
public interface AffinitySupport {
    /**
     * Returns the strong affinity for all invocations.
     * Strong affinity indicates a strict load balancing requirement.
     * @return an affinity
     */
    Affinity getStrongAffinity();

    /**
     * Returns the weak affinity of the specified bean identifier.
     * Weak affinity indicates a load balancing preference within the confines of the strong affinity.
     * @param id a bean identifier
     * @return an affinity
     */
    Affinity getWeakAffinity(I id);
}