Class CommonAutoDeployer
- java.lang.Object
-
- com.flowable.platform.common.deployer.CommonAutoDeployer
-
- All Implemented Interfaces:
Lifecycle,Phased,SmartLifecycle
- Direct Known Subclasses:
DefaultAppAutoDeployer,DefaultCaseDefinitionAutoDeployer,DefaultDmnDefinitionAutoDeployer,DefaultDocumentDefinitionAutoDeployer,DefaultEventRegistryDefinitionAutoDeployer,DefaultFormDefinitionAutoDeployer,DefaultProcessDefinitionAutoDeployer
public abstract class CommonAutoDeployer extends Object implements SmartLifecycle
- Author:
- Filip Hrisafov
-
-
Field Summary
Fields Modifier and Type Field Description protected CommonAutoDeploymentPropertiesdeploymentPropertiesprotected Collection<Resource>deploymentResourcesprotected ObjectlifeCycleMonitorprotected org.slf4j.Loggerloggerprotected booleanrunning-
Fields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE
-
-
Constructor Summary
Constructors Constructor Description CommonAutoDeployer(Collection<Resource> deploymentResources)CommonAutoDeployer(Collection<Resource> deploymentResources, CommonAutoDeploymentProperties deploymentProperties)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddeployResources()protected abstract voiddeployResourcesInternal(Collection<Resource> resources)Methods that should be implemented by sub classes to perform the actual deployment.protected StringdetermineLockName(String deploymentNameHint)protected StringdetermineResourceName(Resource resource)Determines the name to be used for the provided resource.DurationgetDeploymentLockWaitTime()CommonAutoDeploymentPropertiesgetDeploymentProperties()protected abstract LockManagergetLockManager()Get the lock manager for the current deployer.StringgetLockName()abstract intgetPhase()booleanisRunning()booleanisThrowExceptionOnDeploymentFailure()booleanisUseLockForDeployments()voidsetDeploymentProperties(CommonAutoDeploymentProperties deploymentProperties)voidstart()voidstop()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.springframework.context.SmartLifecycle
isAutoStartup, stop
-
-
-
-
Field Detail
-
logger
protected final org.slf4j.Logger logger
-
deploymentProperties
protected CommonAutoDeploymentProperties deploymentProperties
-
deploymentResources
protected final Collection<Resource> deploymentResources
-
lifeCycleMonitor
protected final Object lifeCycleMonitor
-
running
protected boolean running
-
-
Constructor Detail
-
CommonAutoDeployer
public CommonAutoDeployer(Collection<Resource> deploymentResources)
-
CommonAutoDeployer
public CommonAutoDeployer(Collection<Resource> deploymentResources, CommonAutoDeploymentProperties deploymentProperties)
-
-
Method Detail
-
getPhase
public abstract int getPhase()
- Specified by:
getPhasein interfacePhased- Specified by:
getPhasein interfaceSmartLifecycle
-
deployResources
public void deployResources()
-
deployResourcesInternal
protected abstract void deployResourcesInternal(Collection<Resource> resources)
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:
resources- the resources to be deployed
-
getLockManager
protected abstract LockManager getLockManager()
Get the lock manager for the current deployer. Used when the strategy has been configured to use lock for deployments.- Returns:
- the lock manager
-
determineResourceName
protected String determineResourceName(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
-
getDeploymentProperties
public CommonAutoDeploymentProperties getDeploymentProperties()
-
setDeploymentProperties
public void setDeploymentProperties(CommonAutoDeploymentProperties deploymentProperties)
-
isUseLockForDeployments
public boolean isUseLockForDeployments()
-
getDeploymentLockWaitTime
public Duration getDeploymentLockWaitTime()
-
isThrowExceptionOnDeploymentFailure
public boolean isThrowExceptionOnDeploymentFailure()
-
getLockName
public String getLockName()
-
-