Package com.oracle.coherence.spring
Class CoherenceServer
- java.lang.Object
- 
- com.oracle.coherence.spring.CoherenceServer
 
- 
- All Implemented Interfaces:
- Aware,- InitializingBean,- ApplicationContextAware,- Lifecycle,- Phased,- SmartLifecycle
 
 public class CoherenceServer extends java.lang.Object implements InitializingBean, SmartLifecycle, ApplicationContextAware Responsible for starting the defaultCoherenceinstance.- Since:
- 3.0
- Author:
- Gunnar Hillert
 
- 
- 
Field SummaryFields Modifier and Type Field Description static longDEFAULT_STARTUP_TIMEOUT_MILLISStart up default of 60 seconds.static java.lang.StringSTARTUP_TIMEOUT_SYSTEM_PROPERTYStart up default of 60 seconds.- 
Fields inherited from interface org.springframework.context.SmartLifecycleDEFAULT_PHASE
 
- 
 - 
Constructor SummaryConstructors Constructor Description CoherenceServer(com.tangosol.net.Coherence coherence)Create aCoherenceServer.CoherenceServer(com.tangosol.net.Coherence coherence, java.time.Duration startupTimeout)Create aCoherenceServerwith a startup timeout.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()ApplicationContextgetApplicationContext()<K,V>
 com.tangosol.net.NamedCache<K,V>getCache(java.lang.String cacheName)com.tangosol.net.CoherencegetCoherence()java.time.DurationgetStartupTimeout()booleanisRunning()voidsetApplicationContext(ApplicationContext applicationContext)voidstart()voidstop()- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.springframework.context.SmartLifecyclegetPhase, isAutoStartup, stop
 
- 
 
- 
- 
- 
Field Detail- 
DEFAULT_STARTUP_TIMEOUT_MILLISpublic static final long DEFAULT_STARTUP_TIMEOUT_MILLIS Start up default of 60 seconds.- See Also:
- Constant Field Values
 
 - 
STARTUP_TIMEOUT_SYSTEM_PROPERTYpublic static final java.lang.String STARTUP_TIMEOUT_SYSTEM_PROPERTY Start up default of 60 seconds.- See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
CoherenceServerpublic CoherenceServer(com.tangosol.net.Coherence coherence) Create aCoherenceServer.- Parameters:
- coherence- the- Coherenceinstance to run
 
 - 
CoherenceServerpublic CoherenceServer(com.tangosol.net.Coherence coherence, java.time.Duration startupTimeout)Create aCoherenceServerwith a startup timeout.- Parameters:
- coherence- the- Coherenceinstance to run
- startupTimeout- specifies the time within which the Coherence instance needs to start up. If not set defaults to 300000L or to what the system property "coherence.spring.server.startup-timeout-millis" specifies
 
 
- 
 - 
Method Detail- 
afterPropertiesSetpublic void afterPropertiesSet() throws java.lang.Exception- Specified by:
- afterPropertiesSetin interface- InitializingBean
- Throws:
- java.lang.Exception
 
 - 
getCachepublic <K,V> com.tangosol.net.NamedCache<K,V> getCache(java.lang.String cacheName) 
 - 
getApplicationContextpublic ApplicationContext getApplicationContext() 
 - 
getCoherencepublic com.tangosol.net.Coherence getCoherence() 
 - 
setApplicationContextpublic void setApplicationContext(ApplicationContext applicationContext) throws BeansException - Specified by:
- setApplicationContextin interface- ApplicationContextAware
- Throws:
- BeansException
 
 - 
getStartupTimeoutpublic java.time.Duration getStartupTimeout() 
 
- 
 
-