...
Cache configuration is sent and received by server in the following format:
CacheConfiguration | |||||||||||||||||||||||||||||||||||||||||||||||
int | Length of the configuration, in bytes | ||||||||||||||||||||||||||||||||||||||||||||||
int | CacheAtomicityMode, TRANSACTIONAL = 0, ATOMIC = 1 | ||||||||||||||||||||||||||||||||||||||||||||||
int | Backups | ||||||||||||||||||||||||||||||||||||||||||||||
int | CacheMode, LOCAL = 0, REPLICATED = 1, PARTITIONED = 2 | ||||||||||||||||||||||||||||||||||||||||||||||
bool | CopyOnRead | ||||||||||||||||||||||||||||||||||||||||||||||
string | DataRegionName | ||||||||||||||||||||||||||||||||||||||||||||||
bool | EagerTtl | ||||||||||||||||||||||||||||||||||||||||||||||
bool | StatisticsEnabled | ||||||||||||||||||||||||||||||||||||||||||||||
string | GroupNamebool | invalidate | |||||||||||||||||||||||||||||||||||||||||||||
long | DefaultLockTimeout (milliseconds) | ||||||||||||||||||||||||||||||||||||||||||||||
int | MaxConcurrentAsyncOperations | ||||||||||||||||||||||||||||||||||||||||||||||
int | MaxQueryIterators | ||||||||||||||||||||||||||||||||||||||||||||||
string | Name | ||||||||||||||||||||||||||||||||||||||||||||||
bool | IsOnheapcacheEnabled | ||||||||||||||||||||||||||||||||||||||||||||||
int | PartitionLossPolicy, READ_ONLY_SAFE = 0, READ_ONLY_ALL = 1, READ_WRITE_SAFE = 2, READ_WRITE_ALL = 3, IGNORE = 4 | ||||||||||||||||||||||||||||||||||||||||||||||
int | QueryDetailMetricsSize | ||||||||||||||||||||||||||||||||||||||||||||||
int | QueryParallelism | ||||||||||||||||||||||||||||||||||||||||||||||
bool | ReadFromBackup | ||||||||||||||||||||||||||||||||||||||||||||||
int | RebalanceBatchSize | ||||||||||||||||||||||||||||||||||||||||||||||
long | RebalanceBatchesPrefetchCount | ||||||||||||||||||||||||||||||||||||||||||||||
long | RebalanceDelay (milliseconds) | ||||||||||||||||||||||||||||||||||||||||||||||
int | RebalanceMode, SYNC = 0, ASYNC = 1, NONE = 2 | ||||||||||||||||||||||||||||||||||||||||||||||
int | RebalanceOrder | ||||||||||||||||||||||||||||||||||||||||||||||
long | RebalanceThrottle (milliseconds) | ||||||||||||||||||||||||||||||||||||||||||||||
long | RebalanceTimeout (milliseconds) | ||||||||||||||||||||||||||||||||||||||||||||||
bool | SqlEscapeAll | ||||||||||||||||||||||||||||||||||||||||||||||
int | SqlIndexInlineMaxSize | ||||||||||||||||||||||||||||||||||||||||||||||
string | SqlSchema | ||||||||||||||||||||||||||||||||||||||||||||||
int | WriteSynchronizationMode, FULL_SYNC = 0, FULL_ASYNC = 1, PRIMARY_SYNC = 2 | ||||||||||||||||||||||||||||||||||||||||||||||
int | CacheKeyConfiguration count | ||||||||||||||||||||||||||||||||||||||||||||||
CacheKeyConfiguration * count |
| ||||||||||||||||||||||||||||||||||||||||||||||
int | QueryEntity count | ||||||||||||||||||||||||||||||||||||||||||||||
QueryEntity * count |
|
...
Creates cache with provided configuration. Throws an exception if the name is already in use.
Request | |
CacheConfiguration | Cache config (see format above) |
Empty response.
OP_CACHE_GET_OR_CREATE_WITH_CONFIGURATION = 1054
Creates cache with provided configuration. Does nothing if the name is already in use.
Request | |
CacheConfiguration | Cache config (see format above) |
Empty response.
int | Length of the configuration, in bytes |
short | Number of configuration properties |
(short + ...) * n | Configuration property data |
Any number of configuration properties can be provided. Name is required.
Cache configuration data is specified in key-value form, where key is `short` property id and value is property-specific data. Table below describes all available properties.
Property code | Property type | Description | |||||||||||||||||||||||||||||||||||||||||||||||
2 | int | CacheAtomicityMode, TRANSACTIONAL = 0, ATOMIC = 1 | |||||||||||||||||||||||||||||||||||||||||||||||
3 | int | Backups | |||||||||||||||||||||||||||||||||||||||||||||||
1 | int | CacheMode, LOCAL = 0, REPLICATED = 1, PARTITIONED = 2 | |||||||||||||||||||||||||||||||||||||||||||||||
5 | bool | CopyOnRead | |||||||||||||||||||||||||||||||||||||||||||||||
100 | string | DataRegionName | |||||||||||||||||||||||||||||||||||||||||||||||
405 | bool | EagerTtl | |||||||||||||||||||||||||||||||||||||||||||||||
406 | bool | StatisticsEnabled | |||||||||||||||||||||||||||||||||||||||||||||||
400 | string | GroupName | |||||||||||||||||||||||||||||||||||||||||||||||
402 | long | DefaultLockTimeout (milliseconds) | |||||||||||||||||||||||||||||||||||||||||||||||
403 | int | MaxConcurrentAsyncOperations | |||||||||||||||||||||||||||||||||||||||||||||||
206 | int | MaxQueryIterators | |||||||||||||||||||||||||||||||||||||||||||||||
0 | string | Name | |||||||||||||||||||||||||||||||||||||||||||||||
101 | bool | IsOnheapcacheEnabled | |||||||||||||||||||||||||||||||||||||||||||||||
404 | int | PartitionLossPolicy, READ_ONLY_SAFE = 0, READ_ONLY_ALL = 1, READ_WRITE_SAFE = 2, READ_WRITE_ALL = 3, IGNORE = 4 | |||||||||||||||||||||||||||||||||||||||||||||||
202 | int | QueryDetailMetricsSize | |||||||||||||||||||||||||||||||||||||||||||||||
201 | int | QueryParallelism | |||||||||||||||||||||||||||||||||||||||||||||||
6 | bool | ReadFromBackup | |||||||||||||||||||||||||||||||||||||||||||||||
303 | int | RebalanceBatchSize | |||||||||||||||||||||||||||||||||||||||||||||||
304 | long | RebalanceBatchesPrefetchCount | |||||||||||||||||||||||||||||||||||||||||||||||
301 | long | RebalanceDelay (milliseconds) | |||||||||||||||||||||||||||||||||||||||||||||||
300 | int | RebalanceMode, SYNC = 0, ASYNC = 1, NONE = 2 | |||||||||||||||||||||||||||||||||||||||||||||||
305 | int | RebalanceOrder | |||||||||||||||||||||||||||||||||||||||||||||||
306 | long | RebalanceThrottle (milliseconds) | |||||||||||||||||||||||||||||||||||||||||||||||
302 | long | RebalanceTimeout (milliseconds) | |||||||||||||||||||||||||||||||||||||||||||||||
205 | bool | SqlEscapeAll | |||||||||||||||||||||||||||||||||||||||||||||||
204 | int | SqlIndexInlineMaxSize | |||||||||||||||||||||||||||||||||||||||||||||||
203 | string | SqlSchema | |||||||||||||||||||||||||||||||||||||||||||||||
4 | int | WriteSynchronizationMode, FULL_SYNC = 0, FULL_ASYNC = 1, PRIMARY_SYNC = 2 | |||||||||||||||||||||||||||||||||||||||||||||||
401 | int + CacheKeyConfiguration * count | CacheKeyConfiguration count
| |||||||||||||||||||||||||||||||||||||||||||||||
200 | int + QueryEntity * count |
|
Empty response.
OP_CACHE_GET_OR_CREATE_WITH_CONFIGURATION = 1054
Creates cache with provided configuration. Does nothing if the name is already in use. Same request format as above. Empty response.
OP_QUERY_SQL = 2002
Performs SQL query.
...