Skip to content

Commit

Permalink
Clarify MapLoader interaction behaviour [HZG-289] (#1461)
Browse files Browse the repository at this point in the history
Adds additional clarity about `#get` and `#getAll` behaviour on `IMap`
when a `MapLoader` is provided. Since the `MapStore` is an extension of
the `MapLoader`, and some behaviour is already documented in the
`mapstore-triggers` page, I've added it to the existing table.

I've also added a line to the bottom of the page directing users to the
javadocs for more detailed information about interactions as this is
well documented in javadocs.

Fixes https://hazelcast.atlassian.net/browse/HZG-289
  • Loading branch information
JamesHazelcast authored Jan 8, 2025
1 parent fcfbf07 commit ed7f134
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/modules/mapstore/pages/mapstore-triggers.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ is called, it triggers the `MapLoader.loadAllKeys()` method.
|flush()
|Flush all the local dirty entries by calling the `MapStore.storeAll(Map)` or `MapStore.deleteAll(Collection)` methods with the elements marked as dirty.

|get()

getAsync()

|Retrieve an entry from the map. If the entry does not exist in memory the `MapLoader.load(Object)` method is called to retrieve
the entry from the external system if it exists.

|getAll()
|Fetches all entries from the map that match the provided key set. If any keys are not found in memory then this method calls the `MapLoader.loadAll(Collection)` method with the missing keys.

|put()

putAll()
Expand Down Expand Up @@ -66,3 +76,6 @@ executeOnAllEntries()

|Apply the user-defined entry processors to one or more entries. These methods call the `MapLoader.load(Object)` method if the value with key is not found in the memory, to load the value from the external system. If the entry processor updates the entry, these methods call the `MapStore.store(Object, Object)` method to write the value into the external system. If the entry processor updates the entry's value to null value, they call the `MapStore.delete(Object)` method to delete the value from the external system.
|===

More information about the behavior of IMap method calls and their relationship to `MapStore` methods can be found in the
https://docs.hazelcast.org/docs/{full-version}/javadoc/com/hazelcast/map/IMap.html[IMap Javadocs].

0 comments on commit ed7f134

Please sign in to comment.