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 CommonAutoDeploymentProperties
deploymentProperties
protected Collection<Resource>
deploymentResources
protected Object
lifeCycleMonitor
protected org.slf4j.Logger
logger
protected boolean
running
-
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 void
deployResources()
protected abstract void
deployResourcesInternal(Collection<Resource> resources)
Methods that should be implemented by sub classes to perform the actual deployment.protected String
determineLockName(String deploymentNameHint)
protected String
determineResourceName(Resource resource)
Determines the name to be used for the provided resource.Duration
getDeploymentLockWaitTime()
CommonAutoDeploymentProperties
getDeploymentProperties()
protected abstract LockManager
getLockManager()
Get the lock manager for the current deployer.String
getLockName()
abstract int
getPhase()
boolean
isRunning()
boolean
isThrowExceptionOnDeploymentFailure()
boolean
isUseLockForDeployments()
void
setDeploymentProperties(CommonAutoDeploymentProperties deploymentProperties)
void
start()
void
stop()
-
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:
getPhase
in interfacePhased
- Specified by:
getPhase
in 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()
-
-