Skip to content

Commit 6660beb

Browse files
committed
Minor doc updates.
1 parent 4ba13cc commit 6660beb

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

coherence/client.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ async def add_map_listener(
122122
against the map, with the key, old-value and new-value included.
123123
124124
:param listener: the MapListener to register
125-
:param listener_for: the optional the key that identifies the entry for which to raise events or a Filter
125+
:param listener_for: the optional key that identifies the entry for which to raise events or a Filter
126126
that will be passed MapEvent objects to select from; a MapEvent will be delivered to the listener only if the
127127
filter evaluates to `True` for that MapEvent. `None` is equivalent to a Filter that always returns `True`
128128
:param lite: optionally pass `True` to indicate that the MapEvent objects do not have to include the
@@ -134,7 +134,7 @@ async def add_map_listener(
134134
async def remove_map_listener(self, listener: MapListener[K, V], listener_for: Optional[K | Filter] = None) -> None:
135135
"""
136136
Remove a standard map listener that previously registered to receive events.
137-
:param listener: the MapListener to removed
137+
:param listener: the MapListener to be removed
138138
:param listener_for: the key or filter, if any, passed to a previous addMapListener invocation
139139
:raises ValueError: if `listener` is `None`
140140
"""
@@ -179,7 +179,7 @@ async def get_or_default(self, key: K, default_value: Optional[V] = None) -> Opt
179179
@abc.abstractmethod
180180
async def get_all(self, keys: set[K]) -> dict[K, V]:
181181
"""
182-
Get all the specified keys, if they are in the map. For each key that is in the map,
182+
Get all the specified keys if they are in the map. For each key that is in the map,
183183
that key and its corresponding value will be placed in the map that is returned by
184184
this method. The absence of a key in the returned map indicates that it was not in the cache,
185185
which may imply (for caches that can load behind the scenes) that the requested data
@@ -197,9 +197,9 @@ async def put(self, key: K, value: V) -> V:
197197
198198
:param key: the key with which the specified value is to be associated
199199
:param value: the value to be associated with the specified key
200-
:return: the previous value associated with specified key, or `None`
200+
:return: the previous value associated with the specified key, or `None`
201201
if there was no mapping for key. A `None` return can also indicate
202-
that the map previously associated `None` with the specified key,
202+
that the map previously associated `None` with the specified key
203203
if the implementation supports `None` values
204204
"""
205205

@@ -211,8 +211,8 @@ async def put_if_absent(self, key: K, value: V) -> V:
211211
212212
:param key: the key with which the specified value is to be associated
213213
:param value: the value to be associated with the specified key
214-
:return: the previous value associated with specified key, or `None` if there was no mapping for key. A
215-
`None` return can also indicate that the map previously associated `None` with the specified key,
214+
:return: the previous value associated with the specified key, or `None` if there was no mapping for key. A
215+
`None` return can also indicate that the map previously associated `None` with the specified key
216216
if the implementation supports `None` values
217217
218218
"""
@@ -285,7 +285,7 @@ async def replace(self, key: K, value: V) -> V:
285285
:param key: key whose associated value is to be replaced
286286
:param value: value expected to be associated with the specified key
287287
:return: resolving to the previous value associated with the specified key, or `None` if there was no mapping
288-
for the key. (A `None` return can also indicate that the map previously associated `None` with the key,
288+
for the key. (A `None` return can also indicate that the map previously associated `None` with the key
289289
if the implementation supports `None` values.)
290290
"""
291291

@@ -340,7 +340,7 @@ async def invoke(self, key: K, processor: EntryProcessor) -> R:
340340
Invoke the passed EntryProcessor against the Entry specified by the
341341
passed key, returning the result of the invocation.
342342
343-
:param key: the key to process it is not required to exist within the Map
343+
:param key: the key to process - it is not required to exist within the Map
344344
:param processor: the EntryProcessor to use to process the specified key
345345
:return: the result of the invocation as returned from the EntryProcessor
346346
"""
@@ -377,22 +377,22 @@ async def aggregate(
377377
378378
:param aggregator: the EntryAggregator that is used to aggregate across the specified entries of this Map
379379
:param keys: the Iterable of keys that specify the entries within this Map to aggregate across
380-
:param filter: the that is used to select entries within this Map to aggregate across
380+
:param filter: the Filter that is used to select entries within this Map to aggregate across
381381
:return: the result of the invocation as returned from the EntryProcessor
382382
"""
383383

384384
@abc.abstractmethod
385385
async def values(self, filter: Optional[Filter] = None, comparator: Optional[Comparator] = None) -> set[V]:
386386
"""
387387
Return a Set of the values contained in this map that satisfy the criteria expressed by the filter.
388-
If no filter or comparator is specified It returns a Set view of the values contained in this map.The
388+
If no filter or comparator is specified, it returns a Set view of the values contained in this map.The
389389
collection is backed by the map, so changes to the map are reflected in the collection, and vice-versa. If
390390
the map is modified while an iteration over the collection is in progress (except through the iterator's own
391391
`remove` operation), the results of the iteration are undefined.
392392
393393
:param filter: the Filter object representing the criteria that the entries of this map should satisfy
394394
:param comparator: the Comparator object which imposes an ordering on entries in the resulting set; or null
395-
if the entries values natural ordering should be used
395+
if the entries' natural ordering should be used
396396
:return: resolves to the values in the set that satisfy the specified criteria
397397
"""
398398

@@ -415,14 +415,14 @@ async def entries(self, filter: Optional[Filter] = None, comparator: Optional[Co
415415
:param filter: the Filter object representing the criteria that the entries of this map should satisfy
416416
:param comparator: the Comparator object which imposes an ordering on entries in the resulting set; or `None`
417417
if the entries' values natural ordering should be used
418-
:return: a set of entries that satisfy the specif]ied criteria
418+
:return: a set of entries that satisfy the specified criteria
419419
"""
420420

421421

422422
class NamedCache(NamedMap[K, V]):
423423
"""
424424
A Map-based data-structure that manages entries across one or more processes. Entries are typically managed in
425-
memory, and are often comprised of data that is also stored in an external system, for example a database,
425+
memory, and are often comprised of data that is also stored in an external system, for example, a database,
426426
or data that has been assembled or calculated at some significant cost. Such entries are referred to as being
427427
`cached`.
428428
@@ -440,7 +440,7 @@ async def put(self, key: K, value: V, ttl: int = -1) -> V:
440440
:param value: the value to be associated with the specified key
441441
:param ttl: the expiry time in millis (optional)
442442
:return: resolving to the previous value associated with specified key, or `None` if there was no mapping for
443-
key. A `None` return can also indicate that the map previously associated `None` with the specified key,
443+
key. A `None` return can also indicate that the map previously associated `None` with the specified key
444444
if the implementation supports `None` values
445445
446446
"""
@@ -455,7 +455,7 @@ async def put_if_absent(self, key: K, value: V, ttl: int = -1) -> V:
455455
:param value: the value to be associated with the specified key
456456
:param ttl: the expiry time in millis (optional)
457457
:return: resolving to the previous value associated with specified key, or `None` if there was no mapping for
458-
key. A `None` return can also indicate that the map previously associated `None` with the specified key,
458+
key. A `None` return can also indicate that the map previously associated `None` with the specified key
459459
if the implementation supports `None` values
460460
461461
"""

0 commit comments

Comments
 (0)