Package org.camunda.bpm.engine.impl
Class BootstrapEngineCommand
- java.lang.Object
-
- org.camunda.bpm.engine.impl.BootstrapEngineCommand
-
- All Implemented Interfaces:
Command<java.lang.Void>,ProcessEngineBootstrapCommand
public class BootstrapEngineCommand extends java.lang.Object implements ProcessEngineBootstrapCommand
- Author:
- Nikola Koevski
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringINSTALLATION_PROPERTY_NAMEprotected static java.lang.StringTELEMETRY_PROPERTY_NAME
-
Constructor Summary
Constructors Constructor Description BootstrapEngineCommand()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidacquireExclusiveInstallationIdLock(CommandContext commandContext)protected voidacquireExclusiveTelemetryLock(CommandContext commandContext)voidcheckDeploymentLockExists(CommandContext commandContext)voidcheckHistoryCleanupLockExists(CommandContext commandContext)protected voidcheckInstallationIdLockExists(CommandContext commandContext)protected voidcheckTelemetryLockExists(CommandContext commandContext)protected voidcreateHistoryCleanupJob(CommandContext commandContext)protected voidcreateInstallationProperty(CommandContext commandContext)protected voidcreateTelemetryProperty(CommandContext commandContext)protected java.lang.StringdatabaseInstallationId(CommandContext commandContext)protected PropertyEntitydatabaseTelemetryConfiguration(CommandContext commandContext)java.lang.Voidexecute(CommandContext commandContext)voidinitializeInstallationId(CommandContext commandContext)voidinitializeTelemetryProperty(CommandContext commandContext)protected booleanisHistoryCleanupEnabled(CommandContext commandContext)booleanisRetryable()When CockroachDB is used, this command may be retried multiple times until it is successful, or the retries are exhausted.protected voidstartTelemetryReporter(CommandContext commandContext)protected voidupdateTelemetryData(CommandContext commandContext)
-
-
-
Field Detail
-
TELEMETRY_PROPERTY_NAME
protected static final java.lang.String TELEMETRY_PROPERTY_NAME
- See Also:
- Constant Field Values
-
INSTALLATION_PROPERTY_NAME
protected static final java.lang.String INSTALLATION_PROPERTY_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
execute
public java.lang.Void execute(CommandContext commandContext)
-
createHistoryCleanupJob
protected void createHistoryCleanupJob(CommandContext commandContext)
-
checkDeploymentLockExists
public void checkDeploymentLockExists(CommandContext commandContext)
-
checkHistoryCleanupLockExists
public void checkHistoryCleanupLockExists(CommandContext commandContext)
-
isHistoryCleanupEnabled
protected boolean isHistoryCleanupEnabled(CommandContext commandContext)
-
initializeTelemetryProperty
public void initializeTelemetryProperty(CommandContext commandContext)
-
checkTelemetryLockExists
protected void checkTelemetryLockExists(CommandContext commandContext)
-
databaseTelemetryConfiguration
protected PropertyEntity databaseTelemetryConfiguration(CommandContext commandContext)
-
createTelemetryProperty
protected void createTelemetryProperty(CommandContext commandContext)
-
initializeInstallationId
public void initializeInstallationId(CommandContext commandContext)
-
createInstallationProperty
protected void createInstallationProperty(CommandContext commandContext)
-
databaseInstallationId
protected java.lang.String databaseInstallationId(CommandContext commandContext)
-
checkInstallationIdLockExists
protected void checkInstallationIdLockExists(CommandContext commandContext)
-
updateTelemetryData
protected void updateTelemetryData(CommandContext commandContext)
-
startTelemetryReporter
protected void startTelemetryReporter(CommandContext commandContext)
-
acquireExclusiveTelemetryLock
protected void acquireExclusiveTelemetryLock(CommandContext commandContext)
-
acquireExclusiveInstallationIdLock
protected void acquireExclusiveInstallationIdLock(CommandContext commandContext)
-
isRetryable
public boolean isRetryable()
When CockroachDB is used, this command may be retried multiple times until it is successful, or the retries are exhausted. CockroachDB uses a stricter, SERIALIZABLE transaction isolation which ensures a serialized manner of transaction execution. A concurrent transaction that attempts to modify the same data as another transaction is required to abort, rollback and retry. This also makes our use-case of pessimistic locks redundant since we only use them as synchronization barriers, and not to lock actual data which would protect it from concurrent modifications. The BootstrapEngine command only executes internal code, so we are certain that a retry of a failed engine bootstrap will not impact user data, and may be performed multiple times.- Specified by:
isRetryablein interfaceCommand<java.lang.Void>- Returns:
- true if the
CrdbTransactionRetryInterceptorcan make a transparent retry of this command upon failure with aCrdbTransactionRetryException(only used when running on CockroachDB).
-
-