Class CommonAutoDeploymentStrategy<E>

    • Constructor Detail

      • CommonAutoDeploymentStrategy

        public CommonAutoDeploymentStrategy()
    • Method Detail

      • getDeploymentMode

        protected abstract String getDeploymentMode()
        Gets the deployment mode this strategy handles.
        Returns:
        the name of the deployment mode
      • getLockManager

        protected abstract LockManager getLockManager​(E engine,
                                                      String deploymentNameHint)
        Get the lock manager with the given engine and the deploymentNameHint. Used when the strategy has been configured to use lock for deployments.
        Parameters:
        engine - the engine that can be used to get the lock manager.
        deploymentNameHint - the deployment name hint
        Returns:
        the lock manager
      • determineLockName

        protected String determineLockName​(String deploymentNameHint)
      • handlesMode

        public boolean handlesMode​(String mode)
        Description copied from interface: AutoDeploymentStrategy
        Determines whether the strategy handles deployments for the provided deployment mode.
        Specified by:
        handlesMode in interface AutoDeploymentStrategy<E>
        Parameters:
        mode - the mode to determine handling for
        Returns:
        true if the strategy handles the mode; false otherwise
      • deployResources

        public void deployResources​(String deploymentNameHint,
                                    org.springframework.core.io.Resource[] resources,
                                    E engine)
        Description copied from interface: AutoDeploymentStrategy
        Performs deployment for the provided resources, using the provided name as a hint and the provided engine to perform deployment(s).
        Specified by:
        deployResources in interface AutoDeploymentStrategy<E>
        Parameters:
        deploymentNameHint - the hint for the name of deployment(s) performed
        resources - the resources to be deployed
        engine - the engine to use for deployment(s)
      • deployResourcesInternal

        protected abstract void deployResourcesInternal​(String deploymentNameHint,
                                                        org.springframework.core.io.Resource[] resources,
                                                        E engine)
        Methods that should be implemented by sub classes to perform the actual deployment. If use lock for deployments is used than this methods is called with an already acquired lock.
        Parameters:
        deploymentNameHint - the hint for the name of deployment(s) performed
        resources - the resources to be deployed
        engine - the engine to use for deployment(s)
      • determineResourceName

        protected String determineResourceName​(org.springframework.core.io.Resource resource)
        Determines the name to be used for the provided resource.
        Parameters:
        resource - the resource to get the name for
        Returns:
        the name of the resource
      • isUseLockForDeployments

        public boolean isUseLockForDeployments()
      • getDeploymentLockWaitTime

        public Duration getDeploymentLockWaitTime()
      • isThrowExceptionOnDeploymentFailure

        public boolean isThrowExceptionOnDeploymentFailure()
      • getLockName

        public String getLockName()