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

cn.gitlab.virtualcry.reactor.bus.env.Environment Maven / Gradle / Ivy

There is a newer version: 3.2.2
Show newest version
package cn.gitlab.virtualcry.reactor.bus.env;

import cn.gitlab.virtualcry.reactor.bus.spec.EventProcessorComponentSpec;

/**
 * Environment use in {@link cn.gitlab.virtualcry.reactor.bus.Bus} to config {@link
 * cn.gitlab.virtualcry.reactor.bus.processor.EventProcessor}
 *
 * @author VirtualCry
 */
public interface Environment {

    Environment ASYNCHRONOUS  = new AsynchronousEnvironment();
    Environment SYNCHRONOUS = new SynchronousEnvironment();


    /**
     * Force events to be immutable, event will be published after serialize and deserialize,
     * and it must cost a certain amount of performance.
     *
     * @return  {@literal default false}
     */
    default Boolean forceImmutableEvent() {
        return false;
    }


    /**
     * Create a event receiver config .
     *
     * @return  A new processor config {@link EventProcessorComponentSpec} uses in event receiver.
     */
    EventProcessorComponentSpec eventReceiverConfig();


    /**
     * Create a event subscriber config .
     *
     * @return   A new processor config {@link EventProcessorComponentSpec} uses in event subscriber.
     */
    EventProcessorComponentSpec eventSubscriberConfig();

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy