Class Coherence

java.lang.Object
com.tangosol.net.Coherence
All Implemented Interfaces:
AutoCloseable

public class Coherence extends Object implements AutoCloseable
A Coherence instance encapsulates and controls one or more Session instances.

A Coherence instance is typically created from a CoherenceConfiguration which contains one or more SessionConfiguration instances. The Coherence instance is then started which in turn creates and starts the configured Sessions. When the Coherence instance is closed all of the Session instances being managed are also closed.

An example of creating and starting a Coherence instance is shown below:


    SessionConfiguration session = SessionConfiguration.builder()
            .named("Prod")
            .withConfigUri("cache-config.xml")
            .build();

    CoherenceConfiguration cfg = CoherenceConfiguration.builder()
            .withSession(SessionConfiguration.defaultSession())
            .withSession(session)
            .build();

    Coherence coherence = Coherence.create(cfg);

    coherence.start();
 
Since:
20.12
Author:
Jonathan Knight 2020.10.26
See Also: