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 java.lang.Object implements com.tangosol.coherence.config.SystemPropertyResolver, com.tangosol.coherence.config.EnvironmentVariableResolverA CoherenceSystemPropertyResolverandEnvironmentVariableResolverthat uses the SpringEnvironmentto 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
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_PROPERTY_PREFIXBy default empty, indicating that no Coherence property prefix is applied.
-
Constructor Summary
Constructors Constructor Description SpringSystemPropertyResolver()This constructor is required so that Coherence can discover and instantiate this class using the Java ServiceLoader.SpringSystemPropertyResolver(Environment environment)This constructor will be called by Spring to instantiate the singleton bean and set theEnvironment.SpringSystemPropertyResolver(Environment environment, java.lang.String propertyPrefix)This constructor will be called by Spring to instantiate the singleton bean and set theEnvironment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetEnv(java.lang.String coherenceProperty)java.lang.StringgetProperty(java.lang.String coherenceProperty)
-
-
-
Field Detail
-
DEFAULT_PROPERTY_PREFIX
public static final java.lang.String DEFAULT_PROPERTY_PREFIX
By default empty, indicating that no Coherence property prefix is applied.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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 theEnvironment.- Parameters:
environment- the SpringEnvironment. Must not be null.
-
SpringSystemPropertyResolver
public SpringSystemPropertyResolver(Environment environment, java.lang.String propertyPrefix)
This constructor will be called by Spring to instantiate the singleton bean and set theEnvironment.- Parameters:
environment- the SpringEnvironmentpropertyPrefix- must not be null. Empty String means no prefix is being used.
-
-
Method Detail
-
getProperty
public java.lang.String getProperty(java.lang.String coherenceProperty)
- Specified by:
getPropertyin interfacecom.tangosol.coherence.config.SystemPropertyResolver
-
getEnv
public java.lang.String getEnv(java.lang.String coherenceProperty)
- Specified by:
getEnvin interfacecom.tangosol.coherence.config.EnvironmentVariableResolver
-
-