clc map
Map commands are a group of map operations.
Usage:
clc map [command] [flags]
clc map clear
Removes all entries from the map.
Usage:
clc map clear [flags]
Parameters:
Parameter | Required | Description | Default |
---|---|---|---|
|
Optional |
Name of the map. |
|
clc map get
Prints a single entry from the map as a key-value pair.
Usage:
clc map get [key] [flags]
Parameters:
Parameter | Required | Description | Default |
---|---|---|---|
|
Optional |
Name of the map. |
|
|
Required |
Key of the map entry. |
N/A |
|
Optional |
Data type of the key. One of: |
string |
|
Optional |
Output format. Supported formats:
|
|
Example:
clc map get --name yearbook 2012 --key-type i16
clc map set
Sets the given key-value entry pair in a map.
Usage:
clc map set [key] [value] [flags]
Parameters:
Parameter | Required | Description | Default |
---|---|---|---|
|
Optional |
Name of the map. |
|
|
Required |
Key of the map entry. |
N/A |
|
Required |
Value to set for the key. |
N/A |
|
Optional |
Data type of the key. One of: |
string |
|
Optional |
Data type of the value. One of: |
string |
|
Optional |
Duration in milliseconds after which the entry will expire and be evicted. It cannot be shorter than 1 second (1000 ms). |
N/A |
|
Optional |
Maximum time for this entry to stay idle in the map. It cannot be shorter than 1 second (1000 ms). |
N/A |
Example:
clc map set --key-type string hello --value-type f32 19.94 --name myMap --ttl 1300
clc map entry-set
Gets all the entries of the specified map.
Usage:
clc map entry-set [flags]
Parameters:
Parameter | Required | Description | Default |
---|---|---|---|
|
Optional |
Name of the map. |
|
|
Optional |
Output format. Supported formats:
|
|
Example:
clc map entry-set -n myMap
clc map key-set
Gets all the keys of the specified map.
Usage:
clc map key-set [flags]
Parameters:
Parameter | Required | Description | Default |
---|---|---|---|
|
Optional |
Name of the map. |
|
|
Optional |
Output format. Supported formats:
|
|
Example:
clc map key-set -n myMap
clc map values
Gets all the values of the given map.
Usage:
clc map values [flags]
Parameters:
Parameter | Required | Description | Default |
---|---|---|---|
|
Optional |
Name of the map. |
|
|
Optional |
Output format. Supported formats:
|
|
Example:
clc map values -n myMap
clc map lock
Locks the key of the given the map.
This command is only available in the interactive mode.
Usage:
clc map lock [key] [flags]
Parameters:
Parameter | Required | Description | Default |
---|---|---|---|
|
Optional |
Name of the map. |
|
|
Required |
Key of the map entry. |
N/A |
|
Optional |
Data type of the key. One of: |
String |
|--ttl
|Optional
|Duration in milliseconds after which the lock will expire.
|-1
Example:
clc map lock -n my-map --key-type string key1
clc map try-lock
Tries to lock the key of the given the map. Returns a result without waiting.
This command is only available in the interactive mode.
Usage:
clc map try-lock [key] [flags]
Parameters:
Parameter | Required | Description | Default |
---|---|---|---|
|
Optional |
Name of the map. |
|
|
Required |
Key of the map entry. |
N/A |
|
Optional |
Data type of the key. One of: |
String |
|
Optional |
Duration in milliseconds after which the lock will expire. |
-1 |
Example:
clc map try-lock -n my-map --key-type string key1
clc map unlock
Unlocks the key of the given the map.
This command is only available in the interactive mode.
Usage:
clc map unlock [key] [flags]
Parameters:
Parameter | Required | Description | Default |
---|---|---|---|
|
Optional |
Name of the map. |
|
|
Required |
Key of the map entry. |
N/A |
|
Optional |
Data type of the key. One of: |
String |
Example:
clc map unlock -n my-map --key-type string key1
clc map size
Prints the size of the given the map.
Usage:
clc map size [flags]
Parameters:
Parameter | Required | Description | Default |
---|---|---|---|
|
Optional |
Name of the map. |
|
clc map load-all
Load keys from map-store into the map. If no key is given, all keys are loaded.
Usage:
clc map load-all [keys] [flags]
Parameters:
Parameter | Required | Description | Default |
---|---|---|---|
|
Optional |
Name of the map. |
|
|
Required |
Keys of the map entries. |
N/A |
|
Optional |
Data type of the key. One of: |
string |
Example:
clc map load-all --key-type string key1 key2 --name myMap --replace
clc map remove
Deletes the value of a given key in a map and returns the key.
Usage:
clc map remove [flags] [key]
Parameters:
Parameter | Required | Description | Default |
---|---|---|---|
|
Optional |
Name of the map. |
|
|
Required |
Key of the map entry. |
N/A |
|
Optional |
Data type of the key. One of: |
string |
|
Optional |
Output format. Supported formats:
|
|
Example:
clc map remove --name myMap --key-type string k1
k1