Class 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
    • Field Detail

      • GAR_DIR_PREFIX

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

        protected final File f_fileGar
        The GAR file being deployed.
      • f_sAppName

        protected final String f_sAppName
        The name of the application.
      • f_asTenant

        protected final String[] f_asTenant
        An array of tenant IDs.
      • m_aAdapter

        protected ContainerAdapter[] m_aAdapter
        An array of ContainerAdapters managed by this GarServer.
      • m_dirGarExploded

        protected File m_dirGarExploded
        The directory the gar file was exploded to.
    • Constructor Detail

      • GarServer

        public GarServer​(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
      • GarServer

        public GarServer​(File fileGar,
                         String sAppName,
                         String[] asTenant)
        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
        sAppName - (optional) application name
        asTenant - (optional) Domain Partition names
    • Method Detail

      • initialStartServices

        protected void initialStartServices​(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, create and activate a ContainerAdapter.
        Overrides:
        initialStartServices in class DefaultCacheServer
        Parameters:
        cWaitMillis - the interval, in milliseconds, to monitor services
      • startServicesInternal

        protected Map<Service,​String> startServicesInternal()
        Starts the services marked with autostart returning a map of a service name to the started service.
        Overrides:
        startServicesInternal in class DefaultCacheServer
        Returns:
        a map holding all started services keyed by names
      • stopMonitoring

        protected boolean stopMonitoring()
        Ensures the DCS instance has shutdown and the associated ServiceMonitor is no longer monitoring services. return true if the monitoring was active and has been stopped as a result of this call; false if the monitoring was not active
        Overrides:
        stopMonitoring in class DefaultCacheServer
      • deactivate

        public void deactivate()
      • 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.