internal IManagedResource ManagedResource() { _finalPosition = _subscriberPosition.Volatile; _isEos = _finalPosition >= LogBufferDescriptor.EndOfStreamPosition(_logBuffers.MetaDataBuffer()); _isClosed = true; return(new ImageManagedResource(this)); }
/// <summary> /// Is the current consumed position at the end of the stream? /// </summary> /// <returns> true if at the end of the stream or false if not. </returns> public bool IsEndOfStream() { if (_isClosed) { return(_isEos); } return(_subscriberPosition.Get() >= LogBufferDescriptor.EndOfStreamPosition(_logBuffers.MetaDataBuffer())); }
internal void Close() { _finalPosition = _subscriberPosition.GetVolatile(); _isEos = _finalPosition >= LogBufferDescriptor.EndOfStreamPosition(_logBuffers.MetaDataBuffer()); _isClosed = true; }