Class DefaultCoherenceConfigurer

    • Method Detail

      • getCoherence

        public com.tangosol.net.Coherence getCoherence()
        Description copied from interface: CoherenceConfigurer
        Responsible for returning the Coherence instance.
        Specified by:
        getCoherence in interface CoherenceConfigurer
        Returns:
        the Coherence instance
      • createCoherenceConfiguration

        protected com.tangosol.net.CoherenceConfiguration createCoherenceConfiguration()
        Create the CoherenceConfiguration.
        Returns:
        the Configuration for a Coherence instance.
      • createCoherence

        protected com.tangosol.net.Coherence createCoherence​(java.util.Set<SessionType> detectedSessionTypes)
        Creates a Coherence instance with the CoherenceConfiguration provided by getCoherenceConfiguration(). The created Coherence instance may either be a client Coherence instance (Coherence.client(CoherenceConfiguration)) or a cluster member instance (Coherence.clusterMember(CoherenceConfiguration).

        The rules for determining the instance type are as follows in descending priority:

        • Explicit configuration via getCoherenceInstanceType().
        • Via the Set of detected SessionTypes. As soon as SessionType.SERVER is provided, the Coherence instance is configured using Coherence.clusterMember(CoherenceConfiguration).
        • If the Set of detected SessionType is empty, the Coherence instances is configured using Coherence.clusterMember(CoherenceConfiguration).
        Parameters:
        detectedSessionTypes - must not be null
        Returns:
        the Coherence instance
      • getCoherenceServerStartupTimeout

        public java.time.Duration getCoherenceServerStartupTimeout()
        Return the Coherence Server startup timeout value.
        Returns:
        may be null
      • setCoherenceServerStartupTimeout

        public void setCoherenceServerStartupTimeout​(java.time.Duration coherenceServerStartupTimeout)
        Set the Coherence Server startup timeout value. This is an optional property. If not specified the CoherenceServer will use CoherenceServer.DEFAULT_STARTUP_TIMEOUT_MILLIS.
        Parameters:
        coherenceServerStartupTimeout - must be a positive value
        See Also:
        CoherenceServer
      • setCoherenceInstanceType

        public void setCoherenceInstanceType​(CoherenceInstanceType coherenceInstanceType)
        Set the Coherence instance type explicitly. This is an optional property. If not specified, the CoherenceInstanceType will be defined depending on the configured Coherence Sessions. See createCoherence(Set) for further details.
        Parameters:
        coherenceInstanceType - explicitly set the CoherenceInstanceType