1
1
/*
2
- * Copyright (c) 2024 Oracle and/or its affiliates.
2
+ * Copyright (c) 2024, 2025 Oracle and/or its affiliates.
3
3
*
4
4
* You may not use this file except in compliance with the Universal Permissive
5
5
* License (UPL), Version 1.0 (the "License.")
@@ -21,10 +21,10 @@ import (
21
21
"errors"
22
22
"fmt"
23
23
"github.com/google/uuid"
24
- "github.com/oracle/coherence-go-client/coherence"
25
- "github.com/oracle/coherence-go-client/coherence/extractors"
26
- "github.com/oracle/coherence-go-client/coherence/filters"
27
- "github.com/oracle/coherence-go-client/coherence/processors"
24
+ "github.com/oracle/coherence-go-client/v2/ coherence"
25
+ "github.com/oracle/coherence-go-client/v2/ coherence/extractors"
26
+ "github.com/oracle/coherence-go-client/v2/ coherence/filters"
27
+ "github.com/oracle/coherence-go-client/v2/ coherence/processors"
28
28
"log"
29
29
"math/rand"
30
30
"os"
@@ -254,7 +254,7 @@ func stockSplit(trades coherence.NamedCache[string, Trade], prices coherence.Nam
254
254
255
255
symbolExtractor := extractors.Extract [string ]("symbol" )
256
256
257
- ch := coherence .InvokeAllFilter [string , Trade , string ](ctx , trades , filters .Equal (symbolExtractor , symbol ),
257
+ ch := coherence .InvokeAllFilter [string , Trade , int64 ](ctx , trades , filters .Equal (symbolExtractor , symbol ),
258
258
processors .Multiply ("quantity" , factor ))
259
259
260
260
count := 0
@@ -268,7 +268,7 @@ func stockSplit(trades coherence.NamedCache[string, Trade], prices coherence.Nam
268
268
log .Printf ("Updated quantity for %d trades" , count )
269
269
270
270
count = 0
271
- ch2 := coherence .InvokeAllFilter [string , Trade , string ](ctx , trades , filters .Equal (symbolExtractor , symbol ),
271
+ ch2 := coherence .InvokeAllFilter [string , Trade , float64 ](ctx , trades , filters .Equal (symbolExtractor , symbol ),
272
272
processors .Multiply ("price" , float32 (1 )/ float32 (factor )))
273
273
274
274
for v := range ch2 {
0 commit comments