@@ -192,7 +192,7 @@ type MapEvent[K comparable, V any] interface {
192192 Type () MapEventType
193193}
194194
195- // mapEvent struct containing data members to satisfy the MapEvent contract.
195+ // mapEvent struct containing data members to satisfy the [ MapEvent] contract.
196196type mapEvent [K comparable , V any ] struct {
197197 // source the source of the event
198198 source NamedMap [K , V ]
@@ -219,7 +219,7 @@ type mapEvent[K comparable, V any] struct {
219219 newValue * V
220220}
221221
222- // newMapEvent creates and returns a pointer to a new mapEvent .
222+ // newMapEvent creates and returns a pointer to a new [M apEvent] .
223223func newMapEvent [K comparable , V any ](source NamedMap [K , V ], response * proto.MapEventResponse ) * mapEvent [K , V ] {
224224 return & mapEvent [K , V ]{
225225 source : source ,
@@ -280,17 +280,17 @@ func (e *mapEvent[K, V]) NewValue() (*V, error) {
280280 return e .newValue , nil
281281}
282282
283- // Type returns the MapEventType for this MapEvent.
283+ // Type returns the MapEventType for this [ MapEvent] .
284284func (e * mapEvent [K , V ]) Type () MapEventType {
285285 return e .eventType
286286}
287287
288- // Source returns the source of this MapEvent.
288+ // Source returns the source of this [ MapEvent] .
289289func (e * mapEvent [K , V ]) Source () NamedMap [K , V ] {
290290 return e .source
291291}
292292
293- // String returns the string representation of this MapEvent.
293+ // String returns the string representation of this [ MapEvent] .
294294func (e * mapEvent [K , V ]) String () string {
295295 source := e .source
296296 key , keyErr := e .Key ()
@@ -334,44 +334,44 @@ func (sl *sessionLifecycleListener) getEmitter() *eventEmitter[SessionLifecycleE
334334 return sl .emitter
335335}
336336
337- // NewSessionLifecycleListener creates and returns a pointer to a new SessionLifecycleListener instance.
337+ // NewSessionLifecycleListener creates and returns a pointer to a new [ SessionLifecycleListener] instance.
338338func NewSessionLifecycleListener () SessionLifecycleListener {
339339 return & sessionLifecycleListener {newEventEmitter [SessionLifecycleEventType , SessionLifecycleEvent ]()}
340340}
341341
342- // on registers a callback for the specified MapEventType
342+ // on registers a callback for the specified [ MapEventType].
343343func (sl * sessionLifecycleListener ) on (event SessionLifecycleEventType , callback func (SessionLifecycleEvent )) SessionLifecycleListener {
344344 sl .emitter .on (event , callback )
345345 return sl
346346}
347347
348- // OnConnected registers a callback that will be notified when a Session is connected.
348+ // OnConnected registers a callback that will be notified when a [ Session] is connected.
349349func (sl * sessionLifecycleListener ) OnConnected (callback func (SessionLifecycleEvent )) SessionLifecycleListener {
350350 return sl .on (Connected , callback )
351351}
352352
353- // OnDisconnected registers a callback that will be notified when a Session is disconnected.
353+ // OnDisconnected registers a callback that will be notified when a [ Session] is disconnected.
354354func (sl * sessionLifecycleListener ) OnDisconnected (callback func (SessionLifecycleEvent )) SessionLifecycleListener {
355355 return sl .on (Disconnected , callback )
356356}
357357
358- // OnReconnected registers a callback that will be notified when a Session is reconnected.
358+ // OnReconnected registers a callback that will be notified when a [ Session] is reconnected.
359359func (sl * sessionLifecycleListener ) OnReconnected (callback func (SessionLifecycleEvent )) SessionLifecycleListener {
360360 return sl .on (Reconnected , callback )
361361}
362362
363- // OnClosed registers a callback that will be notified when a Session is closed.
363+ // OnClosed registers a callback that will be notified when a [ Session] is closed.
364364func (sl * sessionLifecycleListener ) OnClosed (callback func (SessionLifecycleEvent )) SessionLifecycleListener {
365365 return sl .on (Closed , callback )
366366}
367367
368- // OnAny registers a callback that will be notified when a Session is connected, disconnected, reconnected or closed.
368+ // OnAny registers a callback that will be notified when a [ Session] is connected, disconnected, reconnected or closed.
369369func (sl * sessionLifecycleListener ) OnAny (callback func (SessionLifecycleEvent )) SessionLifecycleListener {
370370 return sl .on (Closed , callback ).OnConnected (callback ).OnDisconnected (callback ).OnReconnected (callback )
371371}
372372
373373// MapLifecycleListener allows registering callbacks to be notified when lifecycle events
374- // (truncated or released) occur against a NamedMap or NamedCache.
374+ // (truncated or released) occur against a [ NamedMap] or [ NamedCache] .
375375type MapLifecycleListener [K comparable , V any ] interface {
376376 OnAny (callback func (MapLifecycleEvent [K , V ])) MapLifecycleListener [K , V ]
377377 OnDestroyed (callback func (MapLifecycleEvent [K , V ])) MapLifecycleListener [K , V ]
@@ -388,7 +388,7 @@ func (l *mapLifecycleListener[K, V]) getEmitter() *eventEmitter[MapLifecycleEven
388388 return l .emitter
389389}
390390
391- // NewMapLifecycleListener creates and returns a pointer to a new MapLifecycleListener instance.
391+ // NewMapLifecycleListener creates and returns a pointer to a new [ MapLifecycleListener] instance.
392392func NewMapLifecycleListener [K comparable , V any ]() MapLifecycleListener [K , V ] {
393393 return & mapLifecycleListener [K , V ]{newEventEmitter [MapLifecycleEventType , MapLifecycleEvent [K , V ]]()}
394394}
@@ -399,28 +399,28 @@ func (l *mapLifecycleListener[K, V]) on(event MapLifecycleEventType, callback fu
399399 return l
400400}
401401
402- // OnDestroyed registers a callback that will be notified when a NamedMap is destroyed.
402+ // OnDestroyed registers a callback that will be notified when a [ NamedMap] is destroyed.
403403func (l * mapLifecycleListener [K , V ]) OnDestroyed (callback func (MapLifecycleEvent [K , V ])) MapLifecycleListener [K , V ] {
404404 return l .on (Destroyed , callback )
405405}
406406
407- // OnTruncated registers a callback that will be notified when a NamedMap is truncated.
407+ // OnTruncated registers a callback that will be notified when a [ NamedMap] is truncated.
408408func (l * mapLifecycleListener [K , V ]) OnTruncated (callback func (MapLifecycleEvent [K , V ])) MapLifecycleListener [K , V ] {
409409 return l .on (Truncated , callback )
410410}
411411
412- // OnReleased registers a callback that will be notified when a NamedMap is released.
412+ // OnReleased registers a callback that will be notified when a [ NamedMap] is released.
413413func (l * mapLifecycleListener [K , V ]) OnReleased (callback func (MapLifecycleEvent [K , V ])) MapLifecycleListener [K , V ] {
414414 return l .on (Released , callback )
415415}
416416
417- // OnAny registers a callback that will be notified when any NamedMap event occurs.
417+ // OnAny registers a callback that will be notified when any [ NamedMap] event occurs.
418418func (l * mapLifecycleListener [K , V ]) OnAny (callback func (MapLifecycleEvent [K , V ])) MapLifecycleListener [K , V ] {
419419 return l .OnTruncated (callback ).OnDestroyed (callback ).OnReleased (callback )
420420}
421421
422422// MapListener allows registering callbacks to be notified when mutations events
423- // occur within a NamedMap or NamedCache.
423+ // occur within a [ NamedMap] or [ NamedCache] .
424424type MapListener [K comparable , V any ] interface {
425425 OnInserted (callback func (MapEvent [K , V ])) MapListener [K , V ]
426426 OnUpdated (callback func (MapEvent [K , V ])) MapListener [K , V ]
@@ -429,12 +429,12 @@ type MapListener[K comparable, V any] interface {
429429 dispatch (event MapEvent [K , V ])
430430}
431431
432- // mapListener struct containing data members to satisfy the MapListener contract.
432+ // mapListener struct containing data members to satisfy the [ MapListener] contract.
433433type mapListener [K comparable , V any ] struct {
434434 emitter * eventEmitter [MapEventType , MapEvent [K , V ]]
435435}
436436
437- // NewMapListener creates and returns a pointer to a new MapListener instance.
437+ // NewMapListener creates and returns a pointer to a new [ MapListener] instance.
438438func NewMapListener [K comparable , V any ]() MapListener [K , V ] {
439439 return & mapListener [K , V ]{newEventEmitter [MapEventType , MapEvent [K , V ]]()}
440440}
@@ -444,7 +444,7 @@ func (l *mapListener[K, V]) dispatch(event MapEvent[K, V]) { //nolint
444444 l .emitter .emit (event .Type (), event )
445445}
446446
447- // on registers a callback for the specified MapEventType
447+ // on registers a callback for the specified [ MapEventType].
448448func (l * mapListener [K , V ]) on (event MapEventType , callback func (MapEvent [K , V ])) MapListener [K , V ] {
449449 l .emitter .on (event , callback )
450450 return l
@@ -483,9 +483,9 @@ type listenerGroup[K comparable, V any] struct {
483483 postUnsubscribe func ()
484484}
485485
486- // addListener registers the specified MapListener to this group. The lite
486+ // addListener registers the specified [ MapListener] to this group. The lite
487487// flag is a hint to the Coherence cluster that an event may omit the old
488- // and new values when emitting a MapEvent.
488+ // and new values when emitting a [ MapEvent] .
489489func (lg * listenerGroup [K , V ]) addListener (ctx context.Context , listener MapListener [K , V ], lite bool ) error {
490490 prevLiteStatus , hasKey := lg .listeners [listener ]
491491 if hasKey && prevLiteStatus == lite {
@@ -541,7 +541,7 @@ func (lg *listenerGroup[K, V]) removeListener(ctx context.Context, listener MapL
541541 return nil
542542}
543543
544- // notify notifies all listeners of the provided MapEvent.
544+ // notify notifies all listeners of the provided [ MapEvent] .
545545func (lg * listenerGroup [K , V ]) notify (event MapEvent [K , V ]) {
546546 if len (lg .listeners ) > 0 {
547547 for l := range lg .listeners {
@@ -566,7 +566,7 @@ func (lg *listenerGroup[K, V]) write(request *proto.MapListenerRequest) error {
566566}
567567
568568// subscribe this group. The lite flag is a hint to the Coherence cluster
569- // that an event may omit the old and new values when emitting a MapEvent.
569+ // that an event may omit the old and new values when emitting a [ MapEvent] .
570570func (lg * listenerGroup [K , V ]) subscribe (ctx context.Context , lite bool ) error {
571571 lg .request .Lite = lite
572572 lg .request .Subscribe = true
@@ -708,7 +708,7 @@ type pendingListenerOp[K comparable, V any] struct {
708708}
709709
710710// newMapEventManager creates/initializes and returns a pointer to a new
711- // mapEventManager
711+ // mapEventManager.
712712func newMapEventManager [K comparable , V any ](namedMap * NamedMap [K , V ], bc baseClient [K , V ], session * Session ) (* mapEventManager [K , V ], error ) {
713713 manager := mapEventManager [K , V ]{
714714 bc : bc ,
@@ -744,7 +744,7 @@ func (m *mapEventManager[K, V]) close() {
744744 m .namedMap = nil
745745}
746746
747- // addLifecycleListener adds the specified MapLifecycleListener.
747+ // addLifecycleListener adds the specified [ MapLifecycleListener] .
748748func (m * mapEventManager [K , V ]) addLifecycleListener (listener MapLifecycleListener [K , V ]) {
749749 for _ , e := range m .lifecycleListeners {
750750 if * e == listener {
@@ -754,7 +754,7 @@ func (m *mapEventManager[K, V]) addLifecycleListener(listener MapLifecycleListen
754754 m .lifecycleListeners = append (m .lifecycleListeners , & listener )
755755}
756756
757- // removeLifecycleListener removes the specified MapLifecycleListener.
757+ // removeLifecycleListener removes the specified [ MapLifecycleListener] .
758758func (m * mapEventManager [K , V ]) removeLifecycleListener (listener MapLifecycleListener [K , V ]) {
759759 idx := - 1
760760 listeners := m .lifecycleListeners
@@ -770,7 +770,7 @@ func (m *mapEventManager[K, V]) removeLifecycleListener(listener MapLifecycleLis
770770 }
771771}
772772
773- // addKeyListener adds a new key-based MapListener. The lite flag is a hint
773+ // addKeyListener adds a new key-based [ MapListener] . The lite flag is a hint
774774// to the Coherence cluster that an event may omit the old and new
775775// values when emitting a MapEvent.
776776func (m * mapEventManager [K , V ]) addKeyListener (ctx context.Context , listener MapListener [K , V ], key K , lite bool ) error {
@@ -796,7 +796,7 @@ func (m *mapEventManager[K, V]) removeKeyListener(ctx context.Context, listener
796796 return nil
797797}
798798
799- // addFilterListener adds a new filter-based MapListener. The lite flag is a hint
799+ // addFilterListener adds a new filter-based [ MapListener] . The lite flag is a hint
800800// to the Coherence cluster that an event may omit the old and new
801801// values when emitting a MapEvent.
802802func (m * mapEventManager [K , V ]) addFilterListener (ctx context.Context , listener MapListener [K , V ], filter filters.Filter , lite bool ) error {
@@ -946,7 +946,7 @@ func (m *mapEventManager[K, V]) ensureStream() (*eventStream, error) {
946946 return m .eventStream , nil
947947}
948948
949- // newSubscribeRequest creates/initializes and returns a proto.MapListenerRequest.
949+ // newSubscribeRequest creates/initializes and returns a [ proto.MapListenerRequest] .
950950func (m * mapEventManager [K , V ]) newSubscribeRequest (requestType string ) proto.MapListenerRequest {
951951 return proto.MapListenerRequest {
952952 Subscribe : true ,
0 commit comments