Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -210,40 +210,12 @@ The default backwards-compatible event publishing strategy only publishes `UPDAT

When you configure Hazelcast members with property `hazelcast.map.entry.filtering.natural.event.types` set to `true`, handling of entry updates conceptually treats value transition as entry, update or exit with regards to the predicate value space. The following table compares how a listener is notified about an update to a map entry value under the default backwards-compatible Hazelcast behavior (when property `hazelcast.map.entry.filtering.natural.event.types` is not set or is set to `false`) versus when set to `true`:

<table>
<colgroup>
<col style={{width:'33.3333%'}} />
<col style={{width:'33.3333%'}} />
<col style={{width:'33.3334%'}} />
</colgroup>
<tbody>
<tr>
<td></td>
<td>`hazelcast.map.entry.filtering.natural.event.types = false` (default)</td>
<td>`hazelcast.map.entry.filtering.natural.event.types = true`</td>
</tr>
<tr>
<td>When old value matches predicate, new value does not match predicate</td>
<td>No event is delivered to entry listener</td>
<td>`REMOVED` event is delivered to entry listener</td>
</tr>
<tr>
<td>When old value matches predicate, new value matches predicate</td>
<td>`UPDATED` event is delivered to entry listener</td>
<td>`UPDATED` event is delivered to entry listener</td>
</tr>
<tr>
<td>When old value does not match predicate, new value does not match predicate</td>
<td>No event is delivered to entry listener</td>
<td>No event is delivered to entry listener</td>
</tr>
<tr>
<td>When old value does not match predicate, new value matches predicate</td>
<td>`UPDATED` event is delivered to entry listener</td>
<td>`ADDED` event is delivered to entry listener</td>
</tr>
</tbody>
</table>
| | `hazelcast.map.entry.filtering.natural.event.types = false` (default) | `hazelcast.map.entry.filtering.natural.event.types = true` |
| --- | --- | --- |
| When old value matches predicate, new value does not match predicate | No event is delivered to entry listener | `REMOVED` event is delivered to entry listener |
| When old value matches predicate, new value matches predicate | `UPDATED` event is delivered to entry listener | `UPDATED` event is delivered to entry listener |
| When old value does not match predicate, new value does not match predicate | No event is delivered to entry listener | No event is delivered to entry listener |
| When old value does not match predicate, new value matches predicate | `UPDATED` event is delivered to entry listener | `ADDED` event is delivered to entry listener |

## Interceptors

Expand All @@ -269,38 +241,14 @@ The map API has two methods for adding and removing an interceptor to the map: `

Methods available within the `MapInterceptor` interface:

<table>
<colgroup>
<col style={{width:'50%'}} />
<col style={{width:'50%'}} />
</colgroup>
<tbody>
<tr>
<td>`interceptGet`</td>
<td>Replace returned `map.get()` value with new value</td>
</tr>
<tr>
<td>`afterGet`</td>
<td>Action to take after `map.get()` operation is complete</td>
</tr>
<tr>
<td>`interceptPut`</td>
<td>Replace value in `map.put()` with new value</td>
</tr>
<tr>
<td>`afterPut`</td>
<td>Action to take after `map.put()` is complete</td>
</tr>
<tr>
<td>`interceptRemove`</td>
<td>Collects removed map entry</td>
</tr>
<tr>
<td>`afterRemove`</td>
<td>Action to take after `map.remove()` is complete</td>
</tr>
</tbody>
</table>
| Method | Description |
| --- | --- |
| `interceptGet` | Replace returned `map.get()` value with new value |
| `afterGet` | Action to take after `map.get()` operation is complete |
| `interceptPut` | Replace value in `map.put()` with new value |
| `afterPut` | Action to take after `map.put()` is complete |
| `interceptRemove` | Collects removed map entry |
| `afterRemove` | Action to take after `map.remove()` is complete |

The following is an example usage.

Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions hazelcast/develop-and-build/sql/functions-and-operators.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,14 @@ Conversion functions allow you to convert the result type of one expression to a
<col style={{width:'37.5%'}} />
<col style={{width:'12.5%'}} />
</colgroup>
<thead>
<tr>
<th>Function</th>
<th>Description</th>
<th>Example</th>
<th>Result</th>
</tr>
</thead>
<tbody>
<tr>
<td>`TO_CHAR(expression [, format model] [, NLS parameter])`</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,26 +70,10 @@ IMap<Long, Employee>

The SQL service has access to the `Employee` object's fields.

<table>
<colgroup>
<col style={{width:'50%'}} />
<col style={{width:'50%'}} />
</colgroup>
<tbody>
<tr>
<td>Name</td>
<td>Type</td>
</tr>
<tr>
<td>`name`</td>
<td>`VARCHAR`</td>
</tr>
<tr>
<td>`age`</td>
<td>`INT`</td>
</tr>
</tbody>
</table>
| Name | Type |
| --- | --- |
| `name` | `VARCHAR` |
| `age` | `INT` |

Together with the key, you may query those fields.

Expand All @@ -110,30 +94,11 @@ If you use Java, you can use the following options to query enums:

For example, consider a map whose values are `Employee` objects with the following fields.

<table>
<colgroup>
<col style={{width:'50%'}} />
<col style={{width:'50%'}} />
</colgroup>
<tbody>
<tr>
<td>Name</td>
<td>Type</td>
</tr>
<tr>
<td>`name`</td>
<td>`String`</td>
</tr>
<tr>
<td>`age`</td>
<td>`Int`</td>
</tr>
<tr>
<td>`status`</td>
<td>`EmployeeStatus`</td>
</tr>
</tbody>
</table>
| Name | Type |
| --- | --- |
| `name` | `String` |
| `age` | `Int` |
| `status` | `EmployeeStatus` |

And the `status` field is an enum called `EmployeeStatus`.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,13 @@ There are some options that can be added only in `CREATE MAPPING`:
<col style={{width:'20%'}} />
<col style={{width:'80%'}} />
</colgroup>
<tbody>
<thead>
<tr>
<td>Name</td>
<td>Description</td>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>`startAt`</td>
<td>
Expand Down
34 changes: 6 additions & 28 deletions hazelcast/develop-and-build/sql/statements/delete.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,34 +44,12 @@ Currently, only `IMap` mappings support deleting rows.

For example, in a map that contains `Employee` objects as values with the following structure:

<table>
<colgroup>
<col style={{width:'50%'}} />
<col style={{width:'50%'}} />
</colgroup>
<tbody>
<tr>
<td>Name</td>
<td>Type</td>
</tr>
<tr>
<td>`startDate`</td>
<td>`INT`</td>
</tr>
<tr>
<td>`amount`</td>
<td>`INT`</td>
</tr>
<tr>
<td>`title`</td>
<td>`STRING`</td>
</tr>
<tr>
<td>`department`</td>
<td>`STRING`</td>
</tr>
</tbody>
</table>
| Name | Type |
| --- | --- |
| `startDate` | `INT` |
| `amount` | `INT` |
| `title` | `STRING` |
| `department` | `STRING` |

You can delete the entries based on the `age` field where the age is less than 18:

Expand Down
34 changes: 6 additions & 28 deletions hazelcast/develop-and-build/sql/statements/update.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,34 +44,12 @@ You can overwrite the values in columns by name, using the `SET` clause.

For example, in a map that contains `Employee` objects as values with the following structure:

<table>
<colgroup>
<col style={{width:'50%'}} />
<col style={{width:'50%'}} />
</colgroup>
<tbody>
<tr>
<td>Name</td>
<td>Type</td>
</tr>
<tr>
<td>`startDate`</td>
<td>`INT`</td>
</tr>
<tr>
<td>`amount`</td>
<td>`INT`</td>
</tr>
<tr>
<td>`title`</td>
<td>`VARCHAR`</td>
</tr>
<tr>
<td>`department`</td>
<td>`VARCHAR`</td>
</tr>
</tbody>
</table>
| Name | Type |
| --- | --- |
| `startDate` | `INT` |
| `amount` | `INT` |
| `title` | `VARCHAR` |
| `department` | `VARCHAR` |

You can update the values of the `Employee.department` field:

Expand Down
Loading