Search in sources :

Example 1 with NodeAffinity

use of org.jboss.ejb.client.NodeAffinity in project wildfly by wildfly.

the class InfinispanBeanManager method getWeakAffinity.

@Override
public Affinity getWeakAffinity(I id) {
    if (this.cache.getCacheConfiguration().clustering().cacheMode().isClustered()) {
        Node node = this.locatePrimaryOwner(id);
        Map.Entry<String, ?> entry = this.registry.getEntry(node);
        if (entry != null) {
            return new NodeAffinity(entry.getKey());
        }
    }
    return Affinity.NONE;
}
Also used : NodeAffinity(org.jboss.ejb.client.NodeAffinity) Node(org.wildfly.clustering.group.Node) Map(java.util.Map)

Aggregations

Map (java.util.Map)1 NodeAffinity (org.jboss.ejb.client.NodeAffinity)1 Node (org.wildfly.clustering.group.Node)1