public StreamId LookupValue(string streamName) { if (string.IsNullOrEmpty(streamName)) { throw new ArgumentNullException(nameof(streamName)); } StreamId streamId; if (SystemStreams.IsMetastream(streamName)) { streamName = SystemStreams.OriginalStreamOf(streamName); streamId = LookupValue(streamName); return(_metastreams.MetaStreamOf(streamId)); } if (LogV3SystemStreams.TryGetVirtualStreamId(streamName, out streamId)) { return(streamId); } var result = _wrapped.LookupValue(streamName); return(result == default ? SystemStreams.IsSystemStream(streamName) ? LogV3SystemStreams.NoSystemStream : LogV3SystemStreams.NoUserStream : result); }
public long LookupId(string streamName) { long streamId; if (SystemStreams.IsMetastream(streamName)) { streamName = SystemStreams.OriginalStreamOf(streamName); streamId = LookupId(streamName); return(_metastreams.MetaStreamOf(streamId)); } if (LogV3SystemStreams.TryGetVirtualStreamId(streamName, out streamId)) { return(streamId); } return(_wrapped.LookupId(streamName)); }
public bool GetOrAddId(string streamName, out long streamId, out long createdId, out string createdName) { if (SystemStreams.IsMetastream(streamName)) { streamName = SystemStreams.OriginalStreamOf(streamName); var ret = GetOrAddId(streamName, out streamId, out createdId, out createdName); streamId = _metastreams.MetaStreamOf(streamId); return(ret); } if (LogV3SystemStreams.TryGetVirtualStreamId(streamName, out streamId)) { createdId = default; createdName = default; return(true); } return(_wrapped.GetOrAddId(streamName, out streamId, out createdId, out createdName)); }
public bool GetOrReserve(string streamName, out StreamId streamId, out StreamId createdId, out string createdName) { Ensure.NotNullOrEmpty(streamName, "streamName"); if (SystemStreams.IsMetastream(streamName)) { streamName = SystemStreams.OriginalStreamOf(streamName); var ret = GetOrReserve(streamName, out streamId, out createdId, out createdName); streamId = _metastreams.MetaStreamOf(streamId); return(ret); } if (LogV3SystemStreams.TryGetVirtualStreamId(streamName, out streamId)) { createdId = default; createdName = default; return(true); } return(_wrapped.GetOrReserve(streamName, out streamId, out createdId, out createdName)); }
public long LookupId(string streamName) { long streamId; if (SystemStreams.IsMetastream(streamName)) { streamName = SystemStreams.OriginalStreamOf(streamName); streamId = LookupId(streamName); return(_metastreams.MetaStreamOf(streamId)); } if (LogV3SystemStreams.TryGetVirtualStreamId(streamName, out streamId)) { return(streamId); } var result = _wrapped.LookupId(streamName); return(result == default ? SystemStreams.IsSystemStream(streamName) ? LogV3SystemStreams.NoSystemStream : LogV3SystemStreams.NoUserStream : result); }
public StreamId MetaStreamOf(StreamId streamId) => _metastreams.MetaStreamOf(streamId);
public long MetaStreamOf(long streamId) => _metastreams.MetaStreamOf(streamId);