Skip to content

Commit cd7226d

Browse files
committed
refactor(MemoryStore): remove unused args
1 parent 7d1e455 commit cd7226d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Equinox.MemoryStore/MemoryStore.fs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type VolatileStore<'Format>() =
3737
events
3838

3939
/// Attempts a synchronization operation - yields conflicting value if expectedCount does not match
40-
member _.TrySync(streamName, _categoryName, _streamId, expectedCount, events): struct (bool * FsCodec.ITimelineEvent<'Format>[]) =
40+
member _.TrySync(streamName, expectedCount, events): struct (bool * FsCodec.ITimelineEvent<'Format>[]) =
4141
// Where attempts overlap on the same stream, there's a race to raise the Committed event for each 'commit'
4242
// If we don't serialize the publishing of the events, its possible for handlers to observe the Events out of order
4343
// NOTE while a Channels based impl might offer better throughput at load, in practical terms serializing all Committed event notifications
@@ -47,6 +47,8 @@ type VolatileStore<'Format>() =
4747
let struct (succeeded, _) as outcome = trySync streamName expectedCount events
4848
if succeeded then committed.Trigger(FsCodec.StreamName.Internal.trust streamName, events)
4949
outcome
50+
[<System.Obsolete "Will be removed in v5">]
51+
member x.TrySync(streamName, _categoryName, _streamId, expectedCount, events): struct (bool * FsCodec.ITimelineEvent<'Format>[]) = x.TrySync(streamName, expectedCount, events)
5052

5153
type private StoreCategory<'event, 'state, 'req, 'Format>(store: VolatileStore<'Format>, codec, fold, initial) =
5254
let fold s xs = (fold : System.Func<'state, 'event[], 'state>).Invoke(s, xs)
@@ -60,7 +62,7 @@ type private StoreCategory<'event, 'state, 'req, 'Format>(store: VolatileStore<'
6062
| xs -> return res xs.Length initial (decode xs) }
6163
member _.Sync(_log, categoryName, streamId, streamName, req, token, state, events, _ct) = task {
6264
let encoded = events |> Array.mapi (fun i e -> FsCodec.Core.TimelineEvent.Create(token.version + int64 i, codec.Encode(req, e)))
63-
match store.TrySync(streamName, categoryName, streamId, int token.version, encoded) with
65+
match store.TrySync(streamName, int token.version, encoded) with
6466
| true, streamEvents' ->
6567
return SyncResult.Written (res streamEvents'.Length state events)
6668
| false, conflictingEvents ->

0 commit comments

Comments
 (0)