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

org.wildfly.clustering.ejb.cache.bean.CompositeImmutableBean Maven / Gradle / Ivy

Go to download

Contains code common to the wildfly-clustering-ejb-hotrod and wildfly-clustering-ejb-infinispan modules.

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.ejb.cache.bean;

import org.wildfly.clustering.ejb.bean.BeanInstance;
import org.wildfly.clustering.ejb.bean.ImmutableBean;
import org.wildfly.clustering.ejb.bean.ImmutableBeanMetaData;

/**
 * A {@link ImmutableBean} implementation composed from a {@link BeanInstance} and an {@link ImmutableBeanMetaData}.
 * @author Paul Ferraro
 * @param  the bean identifier type
 * @param  the bean instance type
 */
public class CompositeImmutableBean> implements ImmutableBean {

    private final K id;
    private final V instance;
    private final ImmutableBeanMetaData metaData;

    public CompositeImmutableBean(K id, V instance, ImmutableBeanMetaData metaData) {
        this.id = id;
        this.instance = instance;
        this.metaData = metaData;
    }

    @Override
    public K getId() {
        return this.id;
    }

    @Override
    public V getInstance() {
        return this.instance;
    }

    @Override
    public ImmutableBeanMetaData getMetaData() {
        return this.metaData;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy