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 Details

    • DEFAULT_STARTUP_TIMEOUT_MILLIS

      public static final long DEFAULT_STARTUP_TIMEOUT_MILLIS
      Start up default of 60 seconds.
      See Also:
    • STARTUP_TIMEOUT_SYSTEM_PROPERTY

      public static final String STARTUP_TIMEOUT_SYSTEM_PROPERTY
      Start up default of 60 seconds.
      See Also:
  • Constructor Details

    • CoherenceServer

      public CoherenceServer(com.tangosol.net.Coherence coherence)
      Create a CoherenceServer.
      Parameters:
      coherence - the Coherence instance to run
    • CoherenceServer

      public CoherenceServer(com.tangosol.net.Coherence coherence, Duration startupTimeout)
      Create a CoherenceServer with a startup timeout.
      Parameters:
      coherence - the Coherence instance 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 Details

    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • getCache

      public <K, V> com.tangosol.net.NamedCache<K,V> getCache(String cacheName)
    • getApplicationContext

      public org.springframework.context.ApplicationContext getApplicationContext()
    • getCoherence

      public com.tangosol.net.Coherence getCoherence()
    • isRunning

      public boolean isRunning()
      Specified by:
      isRunning in interface org.springframework.context.Lifecycle
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • start

      public void start()
      Specified by:
      start in interface org.springframework.context.Lifecycle
    • stop

      public void stop()
      Specified by:
      stop in interface org.springframework.context.Lifecycle
    • getStartupTimeout

      public Duration getStartupTimeout()