Esempio n. 1
0
 public CanContinueBatchParameters(IndexingStatsScope stats, IndexingWorkType workType, QueryOperationContext queryContext, TransactionOperationContext indexingContext,
                                   Lazy <IndexWriteOperation> indexWriteOperation, long currentEtag, long maxEtag, long count,
                                   Stopwatch sw)
 {
     Stats               = stats;
     WorkType            = workType;
     QueryContext        = queryContext;
     IndexingContext     = indexingContext;
     IndexWriteOperation = indexWriteOperation;
     CurrentEtag         = currentEtag;
     MaxEtag             = maxEtag;
     Count               = count;
     Sw = sw;
 }
Esempio n. 2
0
        public void RecordBatchCompletedReason(IndexingWorkType type, string reason)
        {
            switch (type)
            {
            case IndexingWorkType.Cleanup:
                RecordCleanupCompletedReason(reason);
                break;

            case IndexingWorkType.References:
                RecordReferenceCompletedReason(reason);
                break;

            case IndexingWorkType.Map:
                RecordMapCompletedReason(reason);
                break;

            case IndexingWorkType.None:
            case IndexingWorkType.Reduce:
                throw new ArgumentOutOfRangeException(nameof(type) + " doesn't support stopping batch.", type, null);

            default:
                throw new ArgumentOutOfRangeException(nameof(type), type, null);
            }
        }