Пример #1
0
        internal IndexWorkflowQueueBase(Type grainInterfaceType, int queueSequenceNumber, SiloAddress silo, bool isDefinedAsFaultTolerantGrain, GrainId grainId, GrainReference parent)
        {
            State        = new IndexWorkflowQueueState(grainId, silo);
            _iGrainType  = grainInterfaceType;
            _queueSeqNum = queueSequenceNumber;

            _workflowRecordsTail = null;
            _storageProvider     = null;
            __handler            = null;
            _isHandlerWorkerIdle = 1;

            _isDefinedAsFaultTolerantGrain = isDefinedAsFaultTolerantGrain;
            __hasAnyTotalIndex             = 0;

            _writeLock            = new AsyncLock();
            _writeRequestIdGen    = 0;
            _pendingWriteRequests = new HashSet <int>();

            _silo   = silo;
            _parent = parent;
        }
Пример #2
0
        internal IndexWorkflowQueueBase(SiloIndexManager siloIndexManager, Type grainInterfaceType, int queueSequenceNumber, SiloAddress silo,
                                        bool isDefinedAsFaultTolerantGrain, Func <GrainReference> parentFunc)
        {
            queueState          = new IndexWorkflowQueueState(silo);
            _grainInterfaceType = grainInterfaceType;
            _queueSeqNum        = queueSequenceNumber;

            _workflowRecordsTail = null;
            __grainStorage       = null;
            __handler            = null;
            _isHandlerWorkerIdle = 1;

            _isDefinedAsFaultTolerantGrain = isDefinedAsFaultTolerantGrain;

            _writeLock            = new AsyncLock();
            _writeRequestIdGen    = 0;
            _pendingWriteRequests = new HashSet <int>();

            _silo            = silo;
            SiloIndexManager = siloIndexManager;
            _lazyParent      = new Lazy <GrainReference>(parentFunc, true);
        }
        internal IndexWorkflowQueueBase(SiloIndexManager siloIndexManager, Type grainInterfaceType, int queueSequenceNumber, SiloAddress silo,
                                        bool isDefinedAsFaultTolerantGrain, Func <GrainReference> parentFunc, GrainReference recoveryGrainReference = null)
        {
            queueState          = new IndexWorkflowQueueState();
            _grainInterfaceType = grainInterfaceType;
            _queueSeqNum        = queueSequenceNumber;
            _grainTypeName      = "Orleans.Indexing.IndexWorkflowQueue-" + IndexUtils.GetFullTypeName(_grainInterfaceType);

            _workflowRecordsTail = null;
            __handler            = null;
            _isHandlerWorkerIdle = 1;

            _isDefinedAsFaultTolerantGrain = isDefinedAsFaultTolerantGrain;
            this._recoveryGrainReference   = recoveryGrainReference;

            _writeLock            = new AsyncLock();
            _writeRequestIdGen    = 0;
            _pendingWriteRequests = new HashSet <int>();

            _silo            = silo;
            SiloIndexManager = siloIndexManager;
            _lazyParent      = new Lazy <GrainReference>(parentFunc, true);
        }