public abstract class CommonAutoDeploymentStrategy<E> extends Object implements AutoDeploymentStrategy<E>
AutoDeploymentStrategy.
It has support for using a lock manager to lock before doing the deployment.| Modifier and Type | Field and Description |
|---|---|
protected CommonAutoDeploymentProperties |
deploymentProperties |
protected org.slf4j.Logger |
logger |
| Constructor and Description |
|---|
CommonAutoDeploymentStrategy() |
CommonAutoDeploymentStrategy(CommonAutoDeploymentProperties deploymentProperties) |
| Modifier and Type | Method and Description |
|---|---|
void |
deployResources(String deploymentNameHint,
org.springframework.core.io.Resource[] resources,
E engine)
Performs deployment for the provided resources, using the provided name as a hint and the provided
engine to perform deployment(s). |
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.
|
protected String |
determineLockName(String deploymentNameHint) |
protected String |
determineResourceName(org.springframework.core.io.Resource resource)
Determines the name to be used for the provided resource.
|
Duration |
getDeploymentLockWaitTime() |
protected abstract String |
getDeploymentMode()
Gets the deployment mode this strategy handles.
|
CommonAutoDeploymentProperties |
getDeploymentProperties() |
protected abstract LockManager |
getLockManager(E engine,
String deploymentNameHint)
Get the lock manager with the given
engine and the deploymentNameHint. |
String |
getLockName() |
boolean |
handlesMode(String mode)
Determines whether the strategy handles deployments for the provided deployment mode.
|
boolean |
isThrowExceptionOnDeploymentFailure() |
boolean |
isUseLockForDeployments() |
void |
setDeploymentProperties(CommonAutoDeploymentProperties deploymentProperties) |
protected org.slf4j.Logger logger
protected CommonAutoDeploymentProperties deploymentProperties
public CommonAutoDeploymentStrategy()
public CommonAutoDeploymentStrategy(CommonAutoDeploymentProperties deploymentProperties)
protected abstract String getDeploymentMode()
protected abstract LockManager getLockManager(E engine, String deploymentNameHint)
engine and the deploymentNameHint.
Used when the strategy has been configured to use lock for deployments.engine - the engine that can be used to get the lock manager.deploymentNameHint - the deployment name hintpublic boolean handlesMode(String mode)
AutoDeploymentStrategyhandlesMode in interface AutoDeploymentStrategy<E>mode - the mode to determine handling forpublic void deployResources(String deploymentNameHint, org.springframework.core.io.Resource[] resources, E engine)
AutoDeploymentStrategyengine to perform deployment(s).deployResources in interface AutoDeploymentStrategy<E>deploymentNameHint - the hint for the name of deployment(s) performedresources - the resources to be deployedengine - the engine to use for deployment(s)protected abstract void deployResourcesInternal(String deploymentNameHint, org.springframework.core.io.Resource[] resources, E engine)
deploymentNameHint - the hint for the name of deployment(s) performedresources - the resources to be deployedengine - the engine to use for deployment(s)protected String determineResourceName(org.springframework.core.io.Resource resource)
resource - the resource to get the name forpublic CommonAutoDeploymentProperties getDeploymentProperties()
public void setDeploymentProperties(CommonAutoDeploymentProperties deploymentProperties)
public boolean isUseLockForDeployments()
public Duration getDeploymentLockWaitTime()
public boolean isThrowExceptionOnDeploymentFailure()
public String getLockName()
Copyright © 2021 Flowable. All rights reserved.