public bool TryGetName(uint eventTypeId, out string name) { if (LogV3SystemEventTypes.TryGetVirtualEventType(eventTypeId, out name)) { return(true); } return(_wrapped.TryGetName(eventTypeId, out name)); }
public void Initialize(INameExistenceFilter filter) { if (!_streamNames.TryGetLastValue(out var sourceLastStreamId)) { return; } var startStreamId = (uint)Math.Max(LogV3SystemStreams.FirstRealStream, filter.CurrentCheckpoint); for (var streamId = startStreamId; streamId <= sourceLastStreamId; streamId += LogV3SystemStreams.StreamInterval) { if (!_streamNames.TryGetName(streamId, out var name)) { throw new Exception($"NameExistenceFilter: this should never happen. could not find {streamId} in source"); } filter.Add(name); filter.CurrentCheckpoint = streamId; } }
public bool TryGetName(StreamId streamId, out string name) { if (_metastreams.IsMetaStream(streamId)) { streamId = _metastreams.OriginalStreamOf(streamId); if (!TryGetName(streamId, out name)) { return(false); } name = SystemStreams.MetastreamOf(name); return(true); } if (LogV3SystemStreams.TryGetVirtualStreamName(streamId, out name)) { return(true); } return(_wrapped.TryGetName(streamId, out name)); }
public void Initialize(INameExistenceFilter filter, long truncateToPosition) { // todo: truncate if necessary. implementation will likely depend on how the indexes come out if (!_streamNames.TryGetLastValue(out var sourceLastStreamId)) { return; } var startStreamId = (uint)Math.Max(LogV3SystemStreams.FirstRealStream, filter.CurrentCheckpoint); for (var streamId = startStreamId; streamId <= sourceLastStreamId; streamId += LogV3SystemStreams.StreamInterval) { if (!_streamNames.TryGetName(streamId, out var name)) { throw new Exception($"NameExistenceFilter: this should never happen. could not find {streamId} in source"); } filter.Add(name); filter.CurrentCheckpoint = streamId; } }