Skip to content

Map operations

Map operations read, update, and remove elements in map-type bins directly on the server.

Each operation is governed by a map policy (order, write flags, PERSIST_INDEX), can target nested elements using a context, and returns results controlled by a return type.

Map policy

The map policy defines the characteristics of a map write operation.

Map order

The map order is set in the map policy and determines the map subtype. The order type determines how the server accesses map elements:

  • Unordered — no ordering guarantees. Key lookup is a linear scan. Lowest storage overhead.
  • K-ordered — elements are maintained in key order. Key lookup uses binary search. Without a persisted index, the key offset index is built temporarily per operation at O(N) cost.
  • KV-ordered — elements are maintained in key and value order. Without a persisted full index, rank and value lookups use the same heap/scan fallback as K-ordered (the value order index is not built on-demand). With a persisted full index, rank lookups are O(1) and value searches are O(log N).

Use set_type() to convert between order types. See Map performance for the operational complexity of each order type.

Persisting the map index

For large maps with a high read-to-write ratio, rebuilding the offset index on every access can consume significant CPU. Setting PERSIST_INDEX in the map policy stores the index on disk inside the map particle, so subsequent operations load it directly instead of rebuilding it.

PERSIST_INDEX is set per write and applies only to the top-level map, not nested maps.

Setting PERSIST_INDEX on an unordered map sorts its keys into key order and persists the offset index, giving it the same binary-search key lookup behavior as a K-ordered map with a persisted index (column 3 in the performance table).

Write flags

FlagDescription
MODIFY_DEFAULTDefault: upserts; create or update map keys
CREATE_ONLYOnly create new map keys. Fail if the key already exists
UPDATE_ONLYOnly update existing map keys. Fail if a key does not exist
NO_FAILNo-op instead of fail if a policy violation occurred, such as CREATE_ONLY
DO_PARTIALWhen used with NO_FAIL, add elements that did not violate a policy

Write flags can be combined using bitwise OR. For example, UPDATE_ONLY | NO_FAIL | DO_PARTIAL updates existing keys, skips keys that do not exist, and applies the remaining updates without failing.

Context

Context TypeDescription
MAP_INDEXFinds an element in a Map by index. A negative index is a lookup performed in reverse from the end of the map. If it is out of bounds, a parameter error is returned.
MAP_KEYFinds an element in a Map by key.
MAP_RANKFinds an element in a Map by rank. A negative rank is a lookup performed in reverse from the highest ranked.
MAP_VALUEFinds an element in a Map by value.
MAP_KEY_CREATEFinds an element in a Map by key. Creates the element if it does not exist.

The context is a list of element selectors describing a path to the nested map element where the operation should be applied. Without a context it is assumed that the operation occurs at the top level of the map.

Return types

Return TypeDescription
KEYThe key of the element (in single result operations) or elements (in multi result operations)
VALUEThe value of the element (in single result operations) or elements (in multi result operations)
KEY_VALUEThe key/value pair of the element (in single result operations) or elements (in multi result operations)
ORDERED_MAPReturns results as an ordered Map
UNORDERED_MAPReturns results as an unordered Map
NONENothing is returned. It speeds up remove operations by not constructing a reply
COUNTNumber of elements returned
INDEXKey order position of the element, from 0 (smallest key) to N-1 (largest)
REVERSE_INDEXReverse key order position of the element, from 0 (largest key) to N-1 (smallest)
RANKValue order of the element, with 0 being the smallest value
REVERSE_RANKReverse value order of the element, with 0 being the largest value
INVERTEDInvert meaning of map command and return values. Combine with another return type using bitwise OR, such as `COUNT
EXISTSReturns a boolean true if any elements match the criteria. For example, get_all_by_value with EXISTS returns true if the value is in the map.

Examples

  • Remove the 10 map elements with the largest key values: remove_by_index_range(-10, 10, NONE)
  • Remove all but the 10 map elements with the largest key values: remove_by_index_range(-10, 10, NONE | INVERTED)
  • Keep only the top 10 key elements and return the count of removed elements: remove_by_index_range(-10, 10, COUNT | INVERTED)

Modify operations

clear

clear(binName[, ctx])
Description

Clears the map. Map type stays the same.

Returns

null

Code sample
// m = {a: 1, b: 2, c: 3}
client.operate(null, key,
MapOperation.clear("m")
);
// m == {}

decrement

decrement(mapPolicy, binName, key, delta[, ctx])
Description

Decrements values by delta-value for all items identified by key.

Only works for integer or float value types in the {key: value} pair. If the bin does not exist, a new unordered map is created unless a different map order is specified through the map policy.

Type interaction between value and delta-value

Value-TypeDelta: integerDelta: float
Map Entry: integerSubtract normallyTruncate to nearest integer and subtract
Map Entry: floatConvert integer to float and subtractSubtract normally
Returns

New value after decrement

Code sample
// m = {a: 1, b: 10, c: 3}
// decrement is deprecated; use increment with negative value
Record record = client.operate(null, key,
MapOperation.increment(MapPolicy.Default, "m", Value.get("b"), Value.get(-3))
);
// returns 7 (new value of key "b")
// m == {a: 1, b: 7, c: 3}

increment

increment(mapPolicy, binName, key, delta[, ctx])
Description

Increments values by delta-value for all items identified by key.

Only works for integer or float value types in the {key: value} pair. If the bin does not exist, a new unordered map is created unless a different map order is specified through the map policy.

Type interaction between value and delta-value

Value-TypeDelta: integerDelta: float
Map Entry: integerAdd normallyTruncate to nearest integer and add
Map Entry: floatConvert integer to float and addAdd normally
Returns

New value after increment

Code sample
// m = {a: 1, b: 2, c: 3}
Record record = client.operate(null, key,
MapOperation.increment(MapPolicy.Default, "m", Value.get("b"), Value.get(10))
);
// returns 12 (new value of key "b")
// m == {a: 1, b: 12, c: 3}

put_items

put_items(mapPolicy, binName, items[, ctx])
Description

Creates a map bin with a specified order, if the bin does not exist. Takes a map of key/value items and adds them to the map bin.

Returns

The element count of the map after the operation, in the ‘bins’ part of the record under the bin name.

Order

If the bin does not exist, a new unordered map is created unless a different map order is specified through the map policy.

K_ORDERED maps are preferred over UNORDERED maps, with no real disadvantage in terms of space used.

Code sample
// m = {a: 1}
Map<Value, Value> items = new HashMap<>();
items.put(Value.get("b"), Value.get(2));
items.put(Value.get("c"), Value.get(3));
Record record = client.operate(null, key,
MapOperation.putItems(MapPolicy.Default, "m", items)
);
// returns 3 (new map size)
// m == {a: 1, b: 2, c: 3}

put

put(mapPolicy, binName, key, value[, ctx])
Description

Creates a map bin with a specified order, if the bin does not exist. Adds a key/value element to the map.

Returns

The element count of the map after the operation, in the ‘bins’ part of the record under the bin name.

Order

If the bin does not exist, a new unordered map is created unless a different map order is specified through the map policy.

K_ORDERED maps are preferred over UNORDERED maps, with no real disadvantage in terms of space used.

Performance

With a persisted index, ordered maps have 𝓞(log N) worst-case performance. Without a persisted index or for unordered maps, the worst-case performance is 𝓞(N). See Map performance.

Code sample
// m = {a: 1}
Record record = client.operate(null, key,
MapOperation.put(MapPolicy.Default, "m", Value.get("b"), Value.get(2))
);
// returns 2 (new map size)
// m == {a: 1, b: 2}

remove_all_by_key_list

remove_by_key_list(binName, keys, returnType[, ctx])
Description

Remove all {key: value} pairs where map.key ∈ keyList.

Returns

Multi result

Performance

Requesting an ORDERED_MAP return type on an unordered map adds extra ordering cost relative to the number of elements in the result set. See Map performance.

Code sample
// m = {a: 1, b: 2, c: 3, d: 4, e: 5}
List<Value> keys = Arrays.asList(Value.get("a"), Value.get("c"), Value.get("e"));
Record record = client.operate(null, key,
MapOperation.removeByKeyList("m", keys, MapReturnType.KEY_VALUE)
);
// returns {a: 1, c: 3, e: 5}
// m == {b: 2, d: 4}

remove_all_by_value_list

remove_by_value_list(binName, values, returnType[, ctx])
Description

Remove all {key: value} pairs where map.value ∈ valueList.

Returns

Multi result

Performance

Requesting an ORDERED_MAP return type on an unordered map adds extra ordering cost relative to the number of elements in the result set. See Map performance.

Code sample
// m = {a: 1, b: 2, c: 3, d: 4, e: 5}
List<Value> values = Arrays.asList(Value.get(2), Value.get(4));
Record record = client.operate(null, key,
MapOperation.removeByValueList("m", values, MapReturnType.KEY)
);
// returns [b, d]
// m == {a: 1, c: 3, e: 5}

remove_all_by_value

remove_by_value(binName, value, returnType[, ctx])
Description

Remove all {key: value} pairs where map.value == value.

Returns

Multi result

Performance

Requesting an INDEX return type adds 𝓞(N + M) on an unordered map, or 𝓞(M) on a map with a persisted offset index. Requesting an ORDERED_MAP return type on an unordered map adds extra ordering cost relative to the number of elements in the result set. See Map performance.

Code sample
// m = {a: 1, b: 2, c: 1, d: 3}
Record record = client.operate(null, key,
MapOperation.removeByValue("m", Value.get(1), MapReturnType.KEY)
);
// returns [a, c] (keys of removed entries)
// m == {b: 2, d: 3}

remove_by_index_range

remove_by_index_range(binName, index[, count], returnType[, ctx])
Description

Remove all {key: value} pairs where k = indexof(map.key) and k >= index and k < index + count. Omitting count select element(s) where k >= origin + index.

Returns

Multi result

Performance

Requesting a RANK return type adds 𝓞(N log N). Requesting an ORDERED_MAP return type on an unordered map adds extra ordering cost relative to the number of elements in the result set. See Map performance.

Code sample
// m = {a: 1, b: 2, c: 3, d: 4, e: 5} (K_ORDERED)
Record record = client.operate(null, key,
MapOperation.removeByIndexRange("m", 1, 2, MapReturnType.KEY_VALUE)
);
// returns {b: 2, c: 3}
// m == {a: 1, d: 4, e: 5}

remove_by_index

remove_by_index(binName, index, returnType[, ctx])
Description

Remove {key: value} entry where map.key is the ith smallest key where i == index.

Returns

Single result

Performance

Requesting a RANK return type adds 𝓞(N), or 𝓞(log N) with a persisted full index. Requesting an ORDERED_MAP return type on an unordered map adds extra ordering cost relative to the number of elements in the result set. See Map performance.

Code sample
// m = {a: 1, b: 2, c: 3} (K_ORDERED)
Record record = client.operate(null, key,
MapOperation.removeByIndex("m", 0, MapReturnType.KEY_VALUE)
);
// returns {a: 1} (smallest key removed)
// m == {b: 2, c: 3}

remove_by_key_interval

remove_by_key_range(binName, keyBegin, keyEnd, returnType[, ctx])
Description

Remove all {key: value} pairs where map.key >= keyStart and map.key < keyStop. Omitting keyStop select element(s) where map.key >= keyStart.

Returns

Multi result

Performance

Requesting a RANK return type adds 𝓞(N log N). Requesting an ORDERED_MAP return type on an unordered map adds extra ordering cost relative to the number of elements in the result set. See Map performance.

Code sample
// m = {a: 1, b: 2, c: 3, d: 4, e: 5}
Record record = client.operate(null, key,
MapOperation.removeByKeyRange("m", Value.get("b"), Value.get("d"),
MapReturnType.KEY_VALUE)
);
// returns {b: 2, c: 3} (keys >= "b" and < "d")
// m == {a: 1, d: 4, e: 5}

remove_by_key_rel_index_range

remove_by_key_rel_index_range(binName, key, index[, count], returnType[, ctx])
Description

Remove all {key: value} pairs where origin = index(key), k = indexof(map.key) and k >= origin + index and k < origin + index + count. Omitting count select element(s) where k >= origin + index.

Returns

Multi result

Code sample
// m = {a: 1, b: 2, c: 3, d: 4, e: 5} (K_ORDERED)
// From key "b" (index 1), offset 0, count 3
Record record = client.operate(null, key,
MapOperation.removeByKeyRelativeIndexRange("m", Value.get("b"), 0, 3,
MapReturnType.KEY_VALUE)
);
// returns {b: 2, c: 3, d: 4}
// m == {a: 1, e: 5}

remove_by_key

remove_by_key(binName, key, returnType[, ctx])
Description

Remove entry {key: value} where map.key == key.

Returns

Single result

Performance

Requesting an INDEX return type adds 𝓞(N), or 𝓞(log N) with a persisted index. Requesting an ORDERED_MAP return type on an unordered map adds extra ordering cost relative to the number of elements in the result set. See Map performance.

Code sample
// m = {a: 1, b: 2, c: 3}
Record record = client.operate(null, key,
MapOperation.removeByKey("m", Value.get("b"), MapReturnType.VALUE)
);
// returns 2 (removed value)
// m == {a: 1, c: 3}

remove_by_rank_range

remove_by_rank_range(binName, rank[, count], returnType[, ctx])
Description

Remove all {key: value} pairs where r = rankof(map.value) and r >= rank and r < rank + count. Omitting count select element(s) where r >= rank.

Returns

Multi result

Performance

Requesting an INDEX return type adds 𝓞(N log N) on an unordered map, or 𝓞(M) on a map with a persisted offset index. Requesting an ORDERED_MAP return type on an unordered map adds extra ordering cost relative to the number of elements in the result set. See Map performance.

Code sample
// m = {a: 3, b: 1, c: 5, d: 2, e: 4}
Record record = client.operate(null, key,
MapOperation.removeByRankRange("m", 0, 2, MapReturnType.KEY_VALUE)
);
// returns {b: 1, d: 2} (2 smallest values removed)
// m == {a: 3, c: 5, e: 4}

remove_by_rank

remove_by_rank(binName, rank, returnType[, ctx])
Description

Remove {key: value} entry where map.value is the ith smallest value where i == rank.

Returns

Single result

Performance

Requesting an INDEX return type adds 𝓞(N) on an unordered map, or 𝓞(1) on a map with a persisted offset index. Requesting an ORDERED_MAP return type on an unordered map adds extra ordering cost relative to the number of elements in the result set. See Map performance.

Code sample
// m = {a: 3, b: 1, c: 2}
Record record = client.operate(null, key,
MapOperation.removeByRank("m", 0, MapReturnType.KEY_VALUE)
);
// returns {b: 1} (smallest value removed)
// m == {a: 3, c: 2}

remove_by_value_interval

remove_by_value_range(binName, valueBegin, valueEnd, returnType[, ctx])
Description

Remove all {key: value} pairs where map.value >= valueStart and map.value < valueStop. Omitting valueStop select element(s) where map.value >= valueStart.

Returns

Multi result

Performance

Requesting an INDEX return type adds 𝓞(N + M) on an unordered map, or 𝓞(M) on a map with a persisted offset index. Requesting an ORDERED_MAP return type on an unordered map adds extra ordering cost relative to the number of elements in the result set. See Map performance.

Code sample
// m = {a: 1, b: 2, c: 3, d: 4, e: 5}
Record record = client.operate(null, key,
MapOperation.removeByValueRange("m", Value.get(2), Value.get(4),
MapReturnType.KEY_VALUE)
);
// returns {b: 2, c: 3} (values >= 2 and < 4)
// m == {a: 1, d: 4, e: 5}

remove_by_value_rel_rank_range

remove_by_value_rel_rank_range(binName, value, rank[, count], returnType[, ctx])
Description

Remove all {key: value} pairs where origin = rank(value), r = rankof(map.value) and r >= origin + rank and r < origin + rank + count. Omitting count select element(s) where r >= origin + rank.

Returns

Multi result

Code sample
// m = {a: 1, b: 2, c: 3, d: 4, e: 5}
// From value 3 (rank 2), offset 0, count 2
Record record = client.operate(null, key,
MapOperation.removeByValueRelativeRankRange("m", Value.get(3), 0, 2,
MapReturnType.KEY_VALUE)
);
// returns {c: 3, d: 4}
// m == {a: 1, b: 2, e: 5}

Read operations

get_all_by_key_list

get_by_key_list(binName, keys, returnType[, ctx])
Description

Get all {key: value} pairs where map.key ∈ keyList.

Returns

Multi result

Performance

Requesting an ORDERED_MAP return type on an unordered map adds extra ordering cost relative to the number of elements in the result set. See Map performance.

Code sample
// m = {a: 1, b: 2, c: 3, d: 4, e: 5}
List<Value> keys = Arrays.asList(Value.get("a"), Value.get("c"), Value.get("e"));
Record record = client.operate(null, key,
MapOperation.getByKeyList("m", keys, MapReturnType.KEY_VALUE)
);
// returns {a: 1, c: 3, e: 5}

get_all_by_value_list

get_by_value_list(binName, values, returnType[, ctx])
Description

Get all {key: value} pairs where map.value ∈ valueList.

Returns

Multi result

Performance

Requesting an ORDERED_MAP return type on an unordered map adds extra ordering cost relative to the number of elements in the result set. See Map performance.

Code sample
// m = {a: 1, b: 2, c: 3, d: 4, e: 5}
List<Value> values = Arrays.asList(Value.get(2), Value.get(4));
Record record = client.operate(null, key,
MapOperation.getByValueList("m", values, MapReturnType.KEY)
);
// returns [b, d]

get_all_by_value

get_by_value(binName, value, returnType[, ctx])
Description

Get all {key: value} pairs where map.value == value.

Returns

Multi result

Performance

Requesting an INDEX return type adds 𝓞(N + M) on an unordered map, or 𝓞(M) on a map with a persisted offset index. Requesting an ORDERED_MAP return type on an unordered map adds extra ordering cost relative to the number of elements in the result set. See Map performance.

Code sample
// m = {a: 1, b: 2, c: 1, d: 3}
Record record = client.operate(null, key,
MapOperation.getByValue("m", Value.get(1), MapReturnType.KEY)
);
// returns [a, c] (all keys with value == 1)

get_by_index_range

get_by_index_range(binName, index[, count], returnType[, ctx])
Description

Get all {key: value} pairs where k = indexof(map.key) and k >= index and k < index + count. Omitting count select element(s) where k >= origin + index.

Returns

Multi result

Performance

Requesting a RANK return type adds 𝓞(N log N). Requesting an ORDERED_MAP return type on an unordered map adds extra ordering cost relative to the number of elements in the result set. See Map performance.

Code sample
// m = {a: 1, b: 2, c: 3, d: 4, e: 5} (K_ORDERED)
Record record = client.operate(null, key,
MapOperation.getByIndexRange("m", 1, 2, MapReturnType.KEY_VALUE)
);
// returns {b: 2, c: 3} (2 entries starting at index 1)

get_by_index

get_by_index(binName, index, returnType[, ctx])
Description

Get {key: value} entry where map.key is the ith smallest key where i == index.

Returns

Single result

Performance

Requesting a RANK return type adds 𝓞(N), or 𝓞(log N) with a persisted full index. See Map performance.

Code sample
// m = {a: 1, b: 2, c: 3} (K_ORDERED)
Record record = client.operate(null, key,
MapOperation.getByIndex("m", 0, MapReturnType.KEY_VALUE)
);
// returns {a: 1} (smallest key by index)
record = client.operate(null, key,
MapOperation.getByIndex("m", -1, MapReturnType.KEY_VALUE)
);
// returns {c: 3} (largest key by index)

get_by_key_interval

get_by_key_range(binName, keyBegin, keyEnd, returnType[, ctx])
Description

Get all {key: value} pairs where map.key >= keyStart and map.key < keyStop. Omitting keyStop select element(s) where map.key >= keyStart.

Returns

Multi result

Performance

Requesting a RANK return type adds 𝓞(N log N). Requesting an ORDERED_MAP return type on an unordered map adds extra ordering cost relative to the number of elements in the result set. See Map performance.

Code sample
// m = {a: 1, b: 2, c: 3, d: 4, e: 5}
Record record = client.operate(null, key,
MapOperation.getByKeyRange("m", Value.get("b"), Value.get("d"),
MapReturnType.KEY_VALUE)
);
// returns {b: 2, c: 3} (keys >= "b" and < "d")

get_by_key_rel_index_range

get_by_key_rel_index_range(binName, key, index[, count], returnType[, ctx])
Description

Get all {key: value} pairs where origin = index(key), k = indexof(map.key) and k >= origin + index and k < origin + index + count. Omitting count select element(s) where k >= origin + index.

Returns

Multi result

Code sample
// m = {a: 1, b: 2, c: 3, d: 4, e: 5} (K_ORDERED)
// Starting from key "b" (index 1), offset 0, count 3
Record record = client.operate(null, key,
MapOperation.getByKeyRelativeIndexRange("m", Value.get("b"), 0, 3,
MapReturnType.KEY_VALUE)
);
// returns {b: 2, c: 3, d: 4}

get_by_key

get_by_key(binName, key, returnType[, ctx])
Description

Get entry {key: value} where map.key == key.

Returns

Single result

Performance

Requesting an INDEX return type adds 𝓞(N), or 𝓞(log N) with a persisted index. Requesting an ORDERED_MAP return type on an unordered map adds extra ordering cost relative to the number of elements in the result set. See Map performance.

Code sample
// m = {a: 1, b: 2, c: 3}
Record record = client.operate(null, key,
MapOperation.getByKey("m", Value.get("b"), MapReturnType.VALUE)
);
// returns 2

get_by_rank_range

get_by_rank_range(binName, rank[, count], returnType[, ctx])
Description

Get all {key: value} pairs where r = rankof(map.value) and r >= rank and r < rank + count. Omitting count select element(s) where r >= rank.

Returns

Multi result

Performance

Requesting an INDEX return type adds 𝓞(N log N) on an unordered map, or 𝓞(M) on a map with a persisted offset index. Requesting an ORDERED_MAP return type on an unordered map adds extra ordering cost relative to the number of elements in the result set. See Map performance.

Code sample
// m = {a: 3, b: 1, c: 5, d: 2, e: 4}
Record record = client.operate(null, key,
MapOperation.getByRankRange("m", 0, 2, MapReturnType.KEY_VALUE)
);
// returns {b: 1, d: 2} (2 entries with lowest values)

get_by_rank

get_by_rank(binName, rank, returnType[, ctx])
Description

Get {key: value} entry where map.value is the ith smallest value where i == rank.

Returns

Single result

Performance

Requesting an INDEX return type adds 𝓞(N) on an unordered map, or 𝓞(1) on a map with a persisted offset index. Requesting an ORDERED_MAP return type on an unordered map adds extra ordering cost relative to the number of elements in the result set. See Map performance.

Code sample
// m = {a: 3, b: 1, c: 2}
Record record = client.operate(null, key,
MapOperation.getByRank("m", 0, MapReturnType.KEY_VALUE)
);
// returns {b: 1} (smallest value)
record = client.operate(null, key,
MapOperation.getByRank("m", -1, MapReturnType.KEY_VALUE)
);
// returns {a: 3} (largest value)

get_by_value_interval

get_by_value_range(binName, valueBegin, valueEnd, returnType[, ctx])
Description

Get all {key: value} pairs where map.value >= valueStart and map.value < valueStop. Omitting valueStop select element(s) where map.value >= valueStart.

Returns

Multi result

Performance

Requesting an INDEX return type adds 𝓞(N + M) on an unordered map, or 𝓞(M) on a map with a persisted offset index. Requesting an ORDERED_MAP return type on an unordered map adds extra ordering cost relative to the number of elements in the result set. See Map performance.

Code sample
// m = {a: 1, b: 2, c: 3, d: 4, e: 5}
Record record = client.operate(null, key,
MapOperation.getByValueRange("m", Value.get(2), Value.get(4),
MapReturnType.KEY_VALUE)
);
// returns {b: 2, c: 3} (values >= 2 and < 4)

get_by_value_rel_rank_range

get_by_value_rel_rank_range(binName, value, rank[, count], returnType[, ctx])
Description

Get all {key: value} pairs where origin = rank(value), r = rankof(map.value) and r >= origin + rank and r < origin + rank + count. Omitting count select element(s) where r >= origin + rank.

Returns

Multi result

Code sample
// m = {a: 11, b: 22, c: 33, d: 44, e: 55}
// Relative to value 30 (rank would be between b:22 and c:33), offset 0, count 2
Record record = client.operate(null, key,
MapOperation.getByValueRelativeRankRange("m", Value.get(30), 0, 2,
MapReturnType.KEY_VALUE)
);
// returns {c: 33, d: 44}

size

size(binName[, ctx])
Returns

Element count

Code sample
// m = {a: 1, b: 2, c: 3}
Record record = client.operate(null, key,
MapOperation.size("m")
);
// returns 3

Set operations

set_type

set_map_policy(mapPolicy, binName[, ctx])
Description

Modifies the order of an existing map. Order can be UNORDERED, K_ORDERED, or KV_ORDERED

Returns

null

Performance

The worst-case performance of modifying an unordered map to a K_ORDERED or KV_ORDERED one is 𝓞(N log N).

Code sample
// m = {a: 1, b: 2, c: 3} (UNORDERED)
client.operate(null, key,
MapOperation.setMapPolicy(
new MapPolicy(MapOrder.KEY_ORDERED, MapWriteFlags.DEFAULT), "m")
);
// m is now K_ORDERED
Feedback

Was this page helpful?

What type of feedback are you giving?

What would you like us to know?

+Capture screenshot

Can we reach out to you?