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

org.wildfly.clustering.ejb.bean.Bean 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.bean;

import java.util.function.Consumer;

/**
 * Described the mutable and immutable properties of a cached bean.
 * @author Paul Ferraro
 * @param  the bean identifier type
 * @param  the bean instance type
 */
public interface Bean> extends ImmutableBean, AutoCloseable {

    /**
     * Returns the metadata of this bean.
     * @return
     */
    @Override
    BeanMetaData getMetaData();

    /**
     * Indicates whether or not this bean is valid, i.e. not closed nor removed.
     * @return true, if this bean is valid, false otherwise
     */
    boolean isValid();

    /**
     * Removes this bean from the cache, executing the specified task.
     */
    void remove(Consumer removeTask);

    /**
     * Closes any resources used by this bean.
     */
    @Override
    void close();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy