public override void Initialize()
 {
     base.Initialize();
     _writeDispatcher.Cancel(_writeRequestId);
     _readDispatcher.Cancel(_readRequestId);
     foreach (var requestId in _loadStateRequests)
     {
         _readDispatcher.Cancel(requestId);
     }
     _loadStateRequests.Clear();
     _inCheckpointWriteAttempt         = 0;
     _lastWrittenCheckpointEventNumber = 0;
     _nextStateIndexToRequest          = 0;
     _checkpointEventToBePublished     = null;
     _requestedCheckpointPosition      = null;
     _readRequestsInProgress           = 0;
 }
Esempio n. 2
0
 private void EnterInitial()
 {
     _handlerPartition = null;
     foreach (var requestId in _loadStateRequests)
     {
         _readDispatcher.Cancel(requestId);
     }
     _loadStateRequests.Clear();
     _partitionStateCache.Initialize();
     _processingQueue.Initialize();
     _checkpointManager.Initialize();
     _tickPending = false;
     _partitionStateCache.CacheAndLockPartitionState("", new PartitionStateCache.State("", null), null);
     _expectedSubscriptionMessageSequenceNumber = -1; // this is to be overridden when subscribing
     // NOTE: this is to workaround exception in GetState requests submitted by client
 }
Esempio n. 3
0
 public void UnsubscribeAwake(Guid correlationId)
 {
     Awaker.Cancel(correlationId);
 }