Class SpringSystemPropertyResolver

java.lang.Object
com.oracle.coherence.spring.configuration.support.SpringSystemPropertyResolver
All Implemented Interfaces:
com.tangosol.coherence.config.EnvironmentVariableResolver, com.tangosol.coherence.config.SystemPropertyResolver

public class SpringSystemPropertyResolver extends Object implements com.tangosol.coherence.config.SystemPropertyResolver, com.tangosol.coherence.config.EnvironmentVariableResolver
A Coherence SystemPropertyResolver and EnvironmentVariableResolver that uses the Spring Environment to obtain values.

This class needs to be eagerly instantiated by Spring before any Coherence class that might need properties.

Since:
3.0
Author:
Gunnar Hillert
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.tangosol.coherence.config.EnvironmentVariableResolver

    com.tangosol.coherence.config.EnvironmentVariableResolver.Default

    Nested classes/interfaces inherited from interface com.tangosol.coherence.config.SystemPropertyResolver

    com.tangosol.coherence.config.SystemPropertyResolver.Default
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    By default empty, indicating that no Coherence property prefix is applied.
  • Constructor Summary

    Constructors
    Constructor
    Description
    This constructor is required so that Coherence can discover and instantiate this class using the Java ServiceLoader.
    This constructor will be called by Spring to instantiate the singleton bean and set the Environment.
    SpringSystemPropertyResolver(Environment environment, String propertyPrefix)
    This constructor will be called by Spring to instantiate the singleton bean and set the Environment.
  • Method Summary

    Modifier and Type
    Method
    Description
    getEnv(String coherenceProperty)
     
    getProperty(String coherenceProperty)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.tangosol.coherence.config.EnvironmentVariableResolver

    getEnv

    Methods inherited from interface com.tangosol.coherence.config.SystemPropertyResolver

    getProperty
  • Field Details

    • DEFAULT_PROPERTY_PREFIX

      public static final String DEFAULT_PROPERTY_PREFIX
      By default empty, indicating that no Coherence property prefix is applied.
      See Also:
  • Constructor Details

    • SpringSystemPropertyResolver

      public SpringSystemPropertyResolver()
      This constructor is required so that Coherence can discover and instantiate this class using the Java ServiceLoader.
    • SpringSystemPropertyResolver

      public SpringSystemPropertyResolver(Environment environment)
      This constructor will be called by Spring to instantiate the singleton bean and set the Environment.
      Parameters:
      environment - the Spring Environment. Must not be null.
    • SpringSystemPropertyResolver

      public SpringSystemPropertyResolver(Environment environment, String propertyPrefix)
      This constructor will be called by Spring to instantiate the singleton bean and set the Environment.
      Parameters:
      environment - the Spring Environment
      propertyPrefix - must not be null. Empty String means no prefix is being used.
  • Method Details

    • getProperty

      public String getProperty(String coherenceProperty)
      Specified by:
      getProperty in interface com.tangosol.coherence.config.SystemPropertyResolver
    • getEnv

      public String getEnv(String coherenceProperty)
      Specified by:
      getEnv in interface com.tangosol.coherence.config.EnvironmentVariableResolver