コード例 #1
0
 /// <summary>
 ///     Add an explicit index.
 /// </summary>
 /// <param name="explicitIndexDesc">index descriptor</param>
 /// <param name="explicitIndexModuleName">module name</param>
 /// <param name="isRecoveringResilient">indicator for recovering</param>
 /// <param name="explicitIndexName">index name</param>
 /// <throws>ExprValidationException if the index fails to be valid</throws>
 public void AddExplicitIndex(
     string explicitIndexName,
     string explicitIndexModuleName,
     QueryPlanIndexItem explicitIndexDesc,
     bool isRecoveringResilient)
 {
     lock (this) {
         var initIndex =
             AgentInstanceContext.StatementContext.EventTableIndexService.AllowInitIndex(isRecoveringResilient);
         var initializeFrom =
             initIndex ? DataWindowContents : CollectionUtil.NULL_EVENT_ITERABLE;
         IndexRepository.ValidateAddExplicitIndex(
             explicitIndexName,
             explicitIndexModuleName,
             explicitIndexDesc,
             rootView.EventType,
             initializeFrom,
             AgentInstanceContext,
             isRecoveringResilient,
             null);
     }
 }
コード例 #2
0
 public override void AddExplicitIndex(CreateIndexDesc spec)
 {
     IndexRepository.ValidateAddExplicitIndex(spec.IsUnique, spec.IndexName, spec.Columns, TableMetadata.InternalEventType, new PrimaryIndexIterable(_rows));
 }