Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


com.tangosol.net
Class DefaultCacheServer.GarServer

java.lang.Object
  extended by com.tangosol.util.Base
      extended by com.tangosol.net.DefaultCacheServer
          extended by com.tangosol.net.DefaultCacheServer.GarServer

Enclosing class:
DefaultCacheServer

public static class DefaultCacheServer.GarServer
extends DefaultCacheServer

GarServer provides the functionality of DefaultCacheServer under the context of a GAR file. The GAR provided to an instance of GarServer can either be a GAR file complying to the GAR file structure or a directory containing contents complying to the same structure. In the former case the GAR file is extracted to a temporary directory and removed iff a graceful shutdown has occurred.

Since:
Coherence 12.1.2

Nested Class Summary

 

Nested classes/interfaces inherited from class com.tangosol.net.DefaultCacheServer
DefaultCacheServer.GarServer, DefaultCacheServer.ShutdownProcess

 

Field Summary
protected static java.lang.String GAR_DIR_PREFIX
          The prefix used when generating a directory name to contain the exploded artifacts.
protected  ContainerAdapter m_adapter
          A ContainerAdapter to start and stop a gar.
protected  java.io.File m_dirGarExploded
          The directory the gar file was exploded to.
protected  java.io.File m_fileGar
          The GAR file being deployed.
protected  java.lang.String m_sAppName
          The name of the application.

 

Fields inherited from class com.tangosol.net.DefaultCacheServer
DEFAULT_WAIT_MILLIS, m_fServicesStarted, m_fShutdown, m_serviceMon, m_threadShutdown

 

Constructor Summary
DefaultCacheServer.GarServer(java.io.File fileGar)
          Construct a GarServer using the provided GAR file or directory containing the contents complying to the GAR structure.
DefaultCacheServer.GarServer(java.io.File fileGar, java.lang.String sAppName)
          Construct a GarServer using the provided GAR file or directory containing the contents complying to the GAR structure.

 

Method Summary
protected  void checkExplodedDir()
          Check the number of exploded directories is not considerably more than the number of cluster members on this machine.
 java.lang.ClassLoader getClassLoader()
          Return the ClassLoader used by the GarServer.
protected  void setUp(long cWaitMillis)
          Set up any necessary resources including the extraction of a GAR file to a temporary location and the parsing of the GAR's descriptor.
 void shutdownServer()
          Shutdown the DefaultCacheServer.
protected  java.util.Map startServicesInternal(boolean fMonitor)
          Starts the services marked with autostart returning a map of service name to the created service.
protected  void stopMonitoring()
          Ensures the DCS instance has shutdown and the associated ServiceMonitor is no longer monitoring services.

 

Methods inherited from class com.tangosol.net.DefaultCacheServer
ensureInstance, ensureInstance, getConfigurableCacheFactory, getInstance, getServiceBanner, getServiceName, handleEnsureServiceException, initialStartServices, main, monitorServices, shutdown, start, start, startAndMonitor, startDaemon, startDaemon, startDaemon, startDaemon, startDaemon, startServerDaemon, startServerDaemon, startServerDaemon, startServices, startServicesInternal, waitForServiceStart

 

Field Detail

GAR_DIR_PREFIX

protected static final java.lang.String GAR_DIR_PREFIX
The prefix used when generating a directory name to contain the exploded artifacts.
See Also:
Constant Field Values

m_adapter

protected ContainerAdapter m_adapter
A ContainerAdapter to start and stop a gar.

m_fileGar

protected java.io.File m_fileGar
The GAR file being deployed.

m_sAppName

protected java.lang.String m_sAppName
The name of the application.

m_dirGarExploded

protected java.io.File m_dirGarExploded
The directory the gar file was exploded to.

Constructor Detail

DefaultCacheServer.GarServer

public DefaultCacheServer.GarServer(java.io.File fileGar)
Construct a GarServer using the provided GAR file or directory containing the contents complying to the GAR structure.
Parameters:
fileGar - file reference to either a GAR file or a directory containing the contents of the GAR

DefaultCacheServer.GarServer

public DefaultCacheServer.GarServer(java.io.File fileGar,
                                    java.lang.String sAppName)
Construct a GarServer using the provided GAR file or directory containing the contents complying to the GAR structure.
Parameters:
fileGar - file reference to either a GAR file or a directory containing the contents of the GAR

Method Detail

getClassLoader

public java.lang.ClassLoader getClassLoader()
Return the ClassLoader used by the GarServer.

Note: iff the GarServer has not been started this method may return null.

Returns:
the ClassLoader used by the GarServer

setUp

protected void setUp(long cWaitMillis)
Set up any necessary resources including the extraction of a GAR file to a temporary location and the parsing of the GAR's descriptor.
Overrides:
setUp in class DefaultCacheServer
Parameters:
cWaitMillis - the interval, in milliseconds, to monitor services

startServicesInternal

protected java.util.Map startServicesInternal(boolean fMonitor)
Starts the services marked with autostart returning a map of service name to the created service.
Overrides:
startServicesInternal in class DefaultCacheServer
Parameters:
fMonitor - whether to monitor the started services to ensure their existence
Returns:
a map of service name to the created service for all started services

stopMonitoring

protected void stopMonitoring()
Ensures the DCS instance has shutdown and the associated ServiceMonitor is no longer monitoring services.
Overrides:
stopMonitoring in class DefaultCacheServer

shutdownServer

public void shutdownServer()
Shutdown the DefaultCacheServer.
Overrides:
shutdownServer in class DefaultCacheServer

checkExplodedDir

protected void checkExplodedDir()
Check the number of exploded directories is not considerably more than the number of cluster members on this machine. If this is the case log a warning messaging.

Skip navigation links

Oracle® Fusion Middleware Java API Reference for Oracle Coherence
12c (12.1.3.0.0)

E47890-01


Copyright © 2000, 2014, Oracle and/or its affiliates. All rights reserved.