|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.util.Base
com.tangosol.net.DefaultCacheServer
public class DefaultCacheServer
DefaultCacheServer is a simple command line facility that starts all services that are declared as requiring an "autostart" in the configurable factory XML descriptor.
Nested Class Summary | |
---|---|
protected class |
DefaultCacheServer.ShutdownProcess ShutdownHook implementation. |
Field Summary | |
---|---|
static long |
DEFAULT_WAIT_MILLIS The default number of milliseconds between checks for service restart. |
protected boolean |
m_fShutdown Flag that indicates whether of not the shutdown was initiated. |
protected java.lang.Thread |
m_threadShutdown Shutdown hook thread. |
Constructor Summary | |
---|---|
DefaultCacheServer(DefaultConfigurableCacheFactory factory) Construct a DefaultCacheServer using the provided factory. |
Method Summary | |
---|---|
protected java.lang.String |
getServiceBanner(Cluster cluster) Create a list of running services in the given Cluster. |
protected void |
handleEnsureServiceException(java.lang.RuntimeException e) Invoked if starting a service raises an exception. |
protected void |
intialStartServices() Start the services. |
static void |
main(java.lang.String[] asArg) Entry point: start the cache server using the specified path to the "cache-config.dtd" compliant configuration file and checking the service status every N seconds (keep alive interval). |
protected void |
monitorServices(long cWaitMillis) Check the service status periodically (keep alive interval), restarting any stopped services marked as "autostart". |
protected void |
setUp() Setup any necessary resources. |
static void |
shutdown() Shutdown the cache server. |
void |
shutdownServer() Shutdown the DefaultCacheServer. |
static java.util.List |
start() Start all services that are declared as requiring an "autostart" in the default configurable factory XML descriptor. |
static java.util.List |
start(ConfigurableCacheFactory factory) Start all services that are declared as requiring an "autostart" in the configurable factory XML descriptor. |
void |
startAndMonitor(long cWaitMillis) Start the cache server and check the service status periodically, restarting any stopped services. |
static void |
startDaemon() Start the cache server on a dedicated daemon thread. |
java.util.List |
startServices() Start all services that are declared as requiring an "autostart" in the configurable factory XML descriptor. |
Field Detail |
---|
public static final long DEFAULT_WAIT_MILLIS
protected volatile boolean m_fShutdown
protected java.lang.Thread m_threadShutdown
Constructor Detail |
---|
public DefaultCacheServer(DefaultConfigurableCacheFactory factory)
factory
- the DefaultConfigurableCacheFactoryMethod Detail |
---|
public void startAndMonitor(long cWaitMillis)
cWaitMillis
- the number of milliseconds between checkspublic java.util.List startServices()
public void shutdownServer()
public static void shutdown()
public static void startDaemon()
public static void main(java.lang.String[] asArg)
Default configuration file is "coherence-cache-config.xml"; default keep alive interval is 5 sec.
Example: java -server -Xms512m -Xmx512m com.tangosol.net.DefaultCacheServer coherence-cache-config.xml 5
asArg
- the command line argumentspublic static java.util.List start()
public static java.util.List start(ConfigurableCacheFactory factory)
factory
- DefaultConfigurableCacheFactory to useprotected void setUp()
protected void intialStartServices()
protected void monitorServices(long cWaitMillis)
cWaitMillis
- the number of milliseconds between checksprotected void handleEnsureServiceException(java.lang.RuntimeException e)
e
- the RuntimeExceptionstartServices()
protected java.lang.String getServiceBanner(Cluster cluster)
cluster
- Cluster for which to create a list of running services
|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |