Package com.oracle.coherence.spring
Class CoherenceServer
java.lang.Object
com.oracle.coherence.spring.CoherenceServer
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware,org.springframework.context.Lifecycle,org.springframework.context.Phased,org.springframework.context.SmartLifecycle
public class CoherenceServer
extends Object
implements org.springframework.beans.factory.InitializingBean, org.springframework.context.SmartLifecycle, org.springframework.context.ApplicationContextAware
Responsible for starting the default
Coherence instance.- Since:
- 3.0
- Author:
- Gunnar Hillert
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longStart up default of 60 seconds.static final StringStart up default of 60 seconds.Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsConstructorDescriptionCoherenceServer(com.tangosol.net.Coherence coherence) Create aCoherenceServer.CoherenceServer(com.tangosol.net.Coherence coherence, Duration startupTimeout) Create aCoherenceServerwith a startup timeout. -
Method Summary
Modifier and TypeMethodDescriptionvoidorg.springframework.context.ApplicationContext<K,V> com.tangosol.net.NamedCache<K, V> com.tangosol.net.CoherencebooleanvoidsetApplicationContext(org.springframework.context.ApplicationContext applicationContext) voidstart()voidstop()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.context.SmartLifecycle
getPhase, isAutoStartup, isPauseable, stop
-
Field Details
-
DEFAULT_STARTUP_TIMEOUT_MILLIS
public static final long DEFAULT_STARTUP_TIMEOUT_MILLISStart up default of 60 seconds.- See Also:
-
STARTUP_TIMEOUT_SYSTEM_PROPERTY
Start up default of 60 seconds.- See Also:
-
-
Constructor Details
-
CoherenceServer
public CoherenceServer(com.tangosol.net.Coherence coherence) Create aCoherenceServer.- Parameters:
coherence- theCoherenceinstance to run
-
CoherenceServer
Create aCoherenceServerwith a startup timeout.- Parameters:
coherence- theCoherenceinstance to runstartupTimeout- 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 Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
getCache
-
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext() -
getCoherence
public com.tangosol.net.Coherence getCoherence() -
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceorg.springframework.context.Lifecycle
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware- Throws:
org.springframework.beans.BeansException
-
start
public void start()- Specified by:
startin interfaceorg.springframework.context.Lifecycle
-
stop
public void stop()- Specified by:
stopin interfaceorg.springframework.context.Lifecycle
-
getStartupTimeout
-