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 Object
implements InitializingBean, SmartLifecycle, ApplicationContextAware
Responsible for starting the default
Coherence
instance.- Since:
- 3.0
- Author:
- Gunnar Hillert
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
Start up default of 60 seconds.static final String
Start up default of 60 seconds.Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
Constructor Summary
ConstructorDescriptionCoherenceServer
(com.tangosol.net.Coherence coherence) Create aCoherenceServer
.CoherenceServer
(com.tangosol.net.Coherence coherence, Duration startupTimeout) Create aCoherenceServer
with a startup timeout. -
Method Summary
Modifier and TypeMethodDescriptionvoid
<K,
V> com.tangosol.net.NamedCache<K, V> com.tangosol.net.Coherence
boolean
void
setApplicationContext
(ApplicationContext applicationContext) void
start()
void
stop()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.context.SmartLifecycle
getPhase, isAutoStartup, 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
- theCoherence
instance to run
-
CoherenceServer
Create aCoherenceServer
with a startup timeout.- Parameters:
coherence
- theCoherence
instance 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:
afterPropertiesSet
in interfaceInitializingBean
- Throws:
Exception
-
getCache
-
getApplicationContext
-
getCoherence
public com.tangosol.net.Coherence getCoherence() -
isRunning
public boolean isRunning() -
setApplicationContext
- Specified by:
setApplicationContext
in interfaceApplicationContextAware
- Throws:
BeansException
-
start
public void start() -
stop
public void stop() -
getStartupTimeout
-