public RegressionEnvironment Rollout( IList<EPDeploymentRolloutCompiled> items, RolloutOptions options) { Runtime.DeploymentService.Rollout(items, options); return this; }
private IDisposable GetRolloutLock(RolloutOptions options) { try { return(options.RolloutLockStrategy.Acquire(_services.EventProcessingRWLock)); } catch (Exception e) { throw new EPDeployLockException(e.Message, e); } }
public EPDeploymentRollout Rollout( ICollection <EPDeploymentRolloutCompiled> items, RolloutOptions options) { if (options == null) { options = new RolloutOptions(); } ValidateRuntimeAlive(); var rollItemNum = 0; foreach (var item in items) { CheckManifest(rollItemNum++, item.Compiled.Manifest); } DeployerRolloutDeploymentResult rolloutResult; using (GetRolloutLock(options)) { var statementIdRecovery = _services.EpServicesHA.StatementIdRecoveryService; var currentStatementId = statementIdRecovery.CurrentStatementId; if (currentStatementId == null) { currentStatementId = 1; } rolloutResult = DeployerRollout.Rollout(currentStatementId.Value, items, _runtime); statementIdRecovery.CurrentStatementId = currentStatementId + rolloutResult.NumStatements; // dispatch event for (var i = 0; i < rolloutResult.Deployments.Length; i++) { DispatchOnDeploymentEvent(rolloutResult.Deployments[i], i); } } var deployments = new EPDeploymentRolloutItem[items.Count]; for (var i = 0; i < rolloutResult.Deployments.Length; i++) { var deployment = MakeDeployment(rolloutResult.Deployments[i]); deployments[i] = new EPDeploymentRolloutItem(deployment); } return(new EPDeploymentRollout(deployments)); }