internal void ReleasePublication(ExclusivePublication publication) { VerifyActive(); ExclusivePublication publicationToRemove; _activeExclusivePublications.TryRemove(publication.RegistrationId, out publicationToRemove); if (publication == publicationToRemove) { LingerResource(publication.ManagedResource()); AwaitResponse(_driverProxy.RemovePublication(publication.RegistrationId), null); } }
internal void ReleasePublication(ExclusivePublication publication) { if (_isClosed) { throw new InvalidOperationException("Aeron client is closed"); } ExclusivePublication publicationToRemove; _activeExclusivePublications.TryRemove(publication.RegistrationId, out publicationToRemove); if (publication == publicationToRemove) { LingerResource(publication.ManagedResource()); AwaitResponse(_driverProxy.RemovePublication(publication.RegistrationId), null); } }
public void OnNewExclusivePublication( long correlationId, long registrationid, int streamId, int sessionId, int publicationLimitId, string channel, string logFileName) { ExclusivePublication publication = new ExclusivePublication( this, channel, streamId, sessionId, new UnsafeBufferPosition(_counterValuesBuffer, publicationLimitId), _logBuffersFactory.Map(logFileName, MapMode.ReadWrite), registrationid, correlationId); _activeExclusivePublications[correlationId] = publication; }
public void OnNewExclusivePublication( long correlationId, long registrationId, int streamId, int sessionId, int publicationLimitId, int statusIndicatorId, string logFileName) { var publication = new ExclusivePublication( this, _stashedChannel, streamId, sessionId, new UnsafeBufferPosition(_counterValuesBuffer, publicationLimitId), statusIndicatorId, LogBuffers(registrationId, logFileName), registrationId, correlationId ); _resourceByRegIdMap[correlationId] = publication; }
public PublicationManagedResource(ExclusivePublication publication) { _publication = publication; }