Skip to content

Commit 3f5dbe5

Browse files
author
Tim Middleton
authored
Doc updates (#23)
1 parent b6e2d28 commit 3f5dbe5

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

coherence/cache.go

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ type NamedMap[K comparable, V any] interface {
5959
// This call is equivalent to calling AddFilterListenerLite with filters.Always as the filter.
6060
AddListenerLite(ctx context.Context, listener MapListener[K, V]) error
6161

62-
// Clear removes all mappings from this NamedMap.
62+
// Clear removes all mappings from the NamedMap.
6363
Clear(ctx context.Context) error
6464

65-
// Truncate removes all mappings from this NamedMap.
65+
// Truncate removes all mappings from the NamedMap.
6666
// Note: the removal of entries caused by this truncate operation will not be observable.
6767
Truncate(ctx context.Context) error
6868

@@ -79,16 +79,16 @@ type NamedMap[K comparable, V any] interface {
7979
// resources. To access the NamedMap, you must get a new instance.
8080
Release()
8181

82-
// ContainsKey returns true if this NamedMap contains a mapping for the specified key.
82+
// ContainsKey returns true if the NamedMap contains a mapping for the specified key.
8383
ContainsKey(ctx context.Context, key K) (bool, error)
8484

85-
// ContainsValue returns true if this NamedMap maps one or more keys to the specified value
85+
// ContainsValue returns true if the NamedMap maps one or more keys to the specified value
8686
ContainsValue(ctx context.Context, value V) (bool, error)
8787

88-
// ContainsEntry returns true if this NamedMap contains a mapping for the specified key and value.
88+
// ContainsEntry returns true if the NamedMap contains a mapping for the specified key and value.
8989
ContainsEntry(ctx context.Context, key K, value V) (bool, error)
9090

91-
// IsEmpty returns true if this NamedMap contains no mappings.
91+
// IsEmpty returns true if the NamedMap contains no mappings.
9292
IsEmpty(ctx context.Context) (bool, error)
9393

9494
// EntrySetFilter returns a channel from which entries satisfying the specified filter can be obtained.
@@ -142,7 +142,7 @@ type NamedMap[K comparable, V any] interface {
142142
// Error will be equal to coherence. V will be nil if there was no previous value.
143143
PutIfAbsent(ctx context.Context, key K, value V) (*V, error)
144144

145-
// Remove removes the mapping for a key from this NamedMap if it is present and returns the previously
145+
// Remove removes the mapping for a key from the NamedMap if it is present and returns the previously
146146
// mapped value, if any. V will be nil if there was no previous value.
147147
Remove(ctx context.Context, key K) (*V, error)
148148

@@ -170,18 +170,18 @@ type NamedMap[K comparable, V any] interface {
170170
// currently mapped to some value. Returns true if the value was replaced
171171
ReplaceMapping(ctx context.Context, key K, prevValue V, newValue V) (bool, error)
172172

173-
// Size returns the number of mappings contained within this NamedMap.
173+
// Size returns the number of mappings contained within the NamedMap.
174174
Size(ctx context.Context) (int, error)
175175

176-
// GetSession returns the Session associated with this Map.
176+
// GetSession returns the Session associated with the NamedMap.
177177
GetSession() *Session
178178

179-
// ValuesFilter return a view of filtered values contained in this NamedMap.
179+
// ValuesFilter return a view of filtered values contained in the NamedMap.
180180
// The returned channel will be asynchronously filled with values in the
181181
// NamedMap that satisfy the filter.
182182
ValuesFilter(ctx context.Context, filter filters.Filter) <-chan *StreamedValue[V]
183183

184-
// Values return a view of all values contained in this NamedMap.
184+
// Values return a view of all values contained in the NamedMap.
185185
// Note: the entries are paged internally to avoid excessive memory usage, but you need to be
186186
// careful when running this operation against NamedMaps with large number of entries.
187187
Values(ctx context.Context) <-chan *StreamedValue[V]

coherence/named_map_client.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -293,13 +293,13 @@ func (nm *NamedMapClient[K, V]) AddKeyListenerLite(ctx context.Context, listener
293293
return nm.getBaseClient().eventManager.addKeyListener(ctx, listener, key, true)
294294
}
295295

296-
// Clear removes all mappings from this [NamedMap]. This operation is observable and will
296+
// Clear removes all mappings from the [NamedMap]. This operation is observable and will
297297
// trigger any registered events.
298298
func (nm *NamedMapClient[K, V]) Clear(ctx context.Context) error {
299299
return executeClear[K, V](ctx, &nm.baseClient)
300300
}
301301

302-
// Truncate removes all mappings from this [NamedMap].
302+
// Truncate removes all mappings from the [NamedMap].
303303
// Note: the removal of entries caused by this truncate operation will not be observable.
304304
func (nm *NamedMapClient[K, V]) Truncate(ctx context.Context) error {
305305
return executeTruncate[K, V](ctx, &nm.baseClient)
@@ -359,7 +359,7 @@ func (nm *NamedMapClient[K, V]) Release() {
359359
}
360360
}
361361

362-
// ContainsKey returns true if this [NamedMap] contains a mapping for the specified key.
362+
// ContainsKey returns true if the [NamedMap] contains a mapping for the specified key.
363363
//
364364
// The example below shows how to check if a [NamedMap] contains a mapping for the key 1.
365365
//
@@ -375,7 +375,7 @@ func (nm *NamedMapClient[K, V]) ContainsKey(ctx context.Context, key K) (bool, e
375375
return executeContainsKey(ctx, &nm.baseClient, key)
376376
}
377377

378-
// ContainsValue returns true if this [NamedMap] contains a mapping for the specified value.
378+
// ContainsValue returns true if the [NamedMap] contains a mapping for the specified value.
379379
//
380380
// The example below shows how to check if a [NamedMap] contains a mapping for the person.
381381
//
@@ -392,7 +392,7 @@ func (nm *NamedMapClient[K, V]) ContainsValue(ctx context.Context, value V) (boo
392392
return executeContainsValue(ctx, &nm.baseClient, value)
393393
}
394394

395-
// ContainsEntry returns true if this [NamedMap] contains a mapping for the specified key and value.
395+
// ContainsEntry returns true if the [NamedMap] contains a mapping for the specified key and value.
396396
//
397397
// The example below shows how to check if a [NamedMap] contains a mapping for the key 1 and person.
398398
//
@@ -409,7 +409,7 @@ func (nm *NamedMapClient[K, V]) ContainsEntry(ctx context.Context, key K, value
409409
return executeContainsEntry(ctx, &nm.baseClient, key, value)
410410
}
411411

412-
// IsEmpty returns true if this [NamedMap] contains no mappings.
412+
// IsEmpty returns true if the [NamedMap] contains no mappings.
413413
func (nm *NamedMapClient[K, V]) IsEmpty(ctx context.Context) (bool, error) {
414414
return executeIsEmpty(ctx, &nm.baseClient)
415415
}
@@ -462,7 +462,7 @@ func (nm *NamedMapClient[K, V]) EntrySet(ctx context.Context) <-chan *StreamedEn
462462
}
463463

464464
// Get returns the value to which the specified key is mapped. V will be nil
465-
// if this [NamedMap] contains no mapping for the key.
465+
// if the [NamedMap] contains no mapping for the key.
466466
//
467467
// namedMap, err := coherence.NewNamedMap[int, Person](session, "people")
468468
// if err != nil {
@@ -565,7 +565,7 @@ func (nm *NamedMapClient[K, V]) Name() string {
565565
return nm.name
566566
}
567567

568-
// PutAll copies all the mappings from the specified map to this [NamedMap].
568+
// PutAll copies all the mappings from the specified map to the [NamedMap].
569569
// This is the most efficient way to add multiple entries into a [NamedMap] as it
570570
// is carried out in parallel and no previous values are returned.
571571
//
@@ -600,7 +600,7 @@ func (nm *NamedMapClient[K, V]) Put(ctx context.Context, key K, value V) (*V, er
600600
return executePutWithExpiry(ctx, &nm.baseClient, key, value, time.Duration(0))
601601
}
602602

603-
// Remove removes the mapping for a key from this [NamedMap] if it is present and
603+
// Remove removes the mapping for a key from the [NamedMap] if it is present and
604604
// returns the previous value or nil if there wasn't one.
605605
//
606606
// namedMap, err := coherence.NewNamedMap[int, Person](session, "people")
@@ -666,12 +666,12 @@ func (nm *NamedMapClient[K, V]) GetSession() *Session {
666666
return nm.session
667667
}
668668

669-
// Size returns the number of mappings contained within this [NamedMap].
669+
// Size returns the number of mappings contained within the [NamedMap].
670670
func (nm *NamedMapClient[K, V]) Size(ctx context.Context) (int, error) {
671671
return executeSize(ctx, &nm.baseClient)
672672
}
673673

674-
// ValuesFilter returns a view of filtered values contained in this [NamedMap].
674+
// ValuesFilter returns a view of filtered values contained in the [NamedMap].
675675
// The returned channel will be asynchronously filled with values in the
676676
// [NamedMap] that satisfy the filter.
677677
//
@@ -694,7 +694,7 @@ func (nm *NamedMapClient[K, V]) ValuesFilter(ctx context.Context, fltr filters.F
694694
return executeValues(ctx, &nm.baseClient, fltr)
695695
}
696696

697-
// Values returns a view of all values contained in this [NamedMap].
697+
// Values returns a view of all values contained in the [NamedMap].
698698
//
699699
// Note: the entries are paged internally to avoid excessive memory usage, but you need to be
700700
// careful when running this operation against [NamedMap]s with large number of entries.

0 commit comments

Comments
 (0)