Class CoherenceSpringConfiguration
java.lang.Object
com.oracle.coherence.spring.configuration.CoherenceSpringConfiguration
@Configuration
@Import({CoherenceConversionServicePostProcessor.class,NamedCacheConfiguration.class,ExtractorConfiguration.class,FilterConfiguration.class,ExtractorService.class,FilterService.class,MapEventTransformerService.class,MapEventTransformerConfiguration.class,NamedTopicConfiguration.class,CoherenceTopicListenerSubscribers.class})
@PropertySource("classpath:coherence-spring.properties")
public class CoherenceSpringConfiguration
extends Object
Main configuration class to configure Coherence.
- Since:
- 3.0
- Author:
- Gunnar Hillert
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe name of the defaultCoherencebean.static final StringThe name of the default CoherenceClusterbean.static final StringThe name of the defaultCoherenceConfigurationbean.static final StringThe name of theCoherenceConfigurerbean.static final StringThe name of the defaultCoherenceServerbean.protected static final org.apache.commons.logging.Logstatic final StringThe name of the default CoherenceClusterbean. -
Constructor Summary
ConstructorsConstructorDescriptionCoherenceSpringConfiguration(org.springframework.context.ConfigurableApplicationContext context) -
Method Summary
Modifier and TypeMethodDescriptioncom.tangosol.io.SerializerA factory method to produce the default JavaSerializer.com.tangosol.net.Coherencecom.tangosol.net.ClusterReturn the CoherenceCluster.com.tangosol.net.CoherenceConfigurationprotected voidSets up the basic components used by Coherence.com.tangosol.io.SerializerA factory method to produce the default JavaSerializer.com.tangosol.net.Sessionsession(org.springframework.beans.factory.InjectionPoint injectionPoint) Create aSessionfrom the qualifiers on the specified injection point.voidsetCoherenceEventListenerCandidates(CoherenceEventListenerCandidates coherenceEventListenerCandidates)
-
Field Details
-
logger
protected static final org.apache.commons.logging.Log logger -
COHERENCE_BEAN_NAME
The name of the defaultCoherencebean.- See Also:
-
COHERENCE_CONFIGURATION_BEAN_NAME
The name of the defaultCoherenceConfigurationbean.- See Also:
-
COHERENCE_SERVER_BEAN_NAME
The name of the defaultCoherenceServerbean.- See Also:
-
COHERENCE_CLUSTER_BEAN_NAME
The name of the default CoherenceClusterbean.- See Also:
-
SPRING_SYSTEM_PROPERTY_RESOLVER_BEAN_NAME
The name of the default CoherenceClusterbean.- See Also:
-
COHERENCE_CONFIGURER_BEAN_NAME
The name of theCoherenceConfigurerbean.- See Also:
-
-
Constructor Details
-
CoherenceSpringConfiguration
public CoherenceSpringConfiguration(org.springframework.context.ConfigurableApplicationContext context)
-
-
Method Details
-
getCoherence
@Bean("coherence") @DependsOn("springSystemPropertyResolver") public com.tangosol.net.Coherence getCoherence() -
getCoherenceConfiguration
@Bean("coherenceConfiguration") public com.tangosol.net.CoherenceConfiguration getCoherenceConfiguration() -
getCoherenceServer
@Bean("coherenceServer") @DependsOn("springSystemPropertyResolver") public CoherenceServer getCoherenceServer() -
getCoherenceCluster
@Bean("coherenceCluster") @DependsOn("coherenceServer") @Scope("prototype") public com.tangosol.net.Cluster getCoherenceCluster()Return the CoherenceCluster.- Returns:
- the Coherence
Cluster(which may or may not be running)
-
session
@Bean @Scope("prototype") public com.tangosol.net.Session session(org.springframework.beans.factory.InjectionPoint injectionPoint) Create aSessionfrom the qualifiers on the specified injection point. If noNameannotation is provided, then the default session is returned.- Parameters:
injectionPoint- the injection point that theSessionwill be injected into- Returns:
- a
Session
-
initialize
@PostConstruct protected void initialize()Sets up the basic components used by Coherence. These are extracted from the underlyingCoherenceConfigurer, defaulting to sensible values. -
coherenceEventListenerMethodProcessor
-
setCoherenceEventListenerCandidates
@Autowired public void setCoherenceEventListenerCandidates(CoherenceEventListenerCandidates coherenceEventListenerCandidates) -
coherenceTopicListenerPostProcessor
-
defaultSerializer
@Qualifier("java") @Bean public com.tangosol.io.Serializer defaultSerializer()A factory method to produce the default JavaSerializer.- Returns:
- the default Java
Serializer
-
pofSerializer
@Qualifier("pof") @Bean public com.tangosol.io.Serializer pofSerializer()A factory method to produce the default JavaSerializer.- Returns:
- the default Java
Serializer
-