Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Cache configuration is sent and received by server in the following format:

CacheConfiguration
intLength of the configuration, in bytes
intCacheAtomicityMode, TRANSACTIONAL = 0, ATOMIC = 1
intBackups
intCacheMode, LOCAL = 0, REPLICATED = 1, PARTITIONED = 2
boolCopyOnRead
stringDataRegionName
boolEagerTtl
boolStatisticsEnabled
stringGroupNameboolinvalidate
longDefaultLockTimeout (milliseconds)
intMaxConcurrentAsyncOperations
intMaxQueryIterators
stringName
boolIsOnheapcacheEnabled
intPartitionLossPolicy, READ_ONLY_SAFE = 0, READ_ONLY_ALL = 1, READ_WRITE_SAFE = 2, READ_WRITE_ALL = 3, IGNORE = 4
intQueryDetailMetricsSize
intQueryParallelism
boolReadFromBackup
intRebalanceBatchSize
longRebalanceBatchesPrefetchCount
longRebalanceDelay (milliseconds)
intRebalanceMode, SYNC = 0, ASYNC = 1, NONE = 2
intRebalanceOrder
longRebalanceThrottle (milliseconds)
longRebalanceTimeout (milliseconds)
boolSqlEscapeAll
intSqlIndexInlineMaxSize
stringSqlSchema
intWriteSynchronizationMode, FULL_SYNC = 0, FULL_ASYNC = 1, PRIMARY_SYNC = 2
intCacheKeyConfiguration count
CacheKeyConfiguration * count
CacheKeyConfiguration
stringType name
stringAffinity key field name
intQueryEntity count
QueryEntity * count
QueryEntity
stringKey type name
stringValue type name
stringTable name
stringKey field name
stringValue field name
intQueryField count
QueryField * count
QueryField
stringName
stringType name
boolIs key field
boolIs NotNull constraint field
intAlias count
(string + string) * countField name aliases
intQueryIndex count
QueryIndex * count
QueryIndex
stringIndex name
byteIndex type, SORTED = 0, FULLTEXT = 1, GEOSPATIAL = 2
intInline size
intField count
(string + bool) * countFields (name + IsDescensing)

...

Creates cache with provided configuration. Throws an exception if the name is already in use. 

Request
CacheConfigurationCache 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
CacheConfigurationCache config (see format above)

 Empty response.

intLength of the configuration, in bytes
shortNumber of configuration properties
(short + ...) * nConfiguration 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 codeProperty typeDescription
2intCacheAtomicityMode, TRANSACTIONAL = 0, ATOMIC = 1
3intBackups
1intCacheMode, LOCAL = 0, REPLICATED = 1, PARTITIONED = 2
5boolCopyOnRead
100stringDataRegionName
405boolEagerTtl
406boolStatisticsEnabled
400stringGroupName
402longDefaultLockTimeout (milliseconds)
403intMaxConcurrentAsyncOperations
206intMaxQueryIterators
0stringName
101boolIsOnheapcacheEnabled
404intPartitionLossPolicy, READ_ONLY_SAFE = 0, READ_ONLY_ALL = 1, READ_WRITE_SAFE = 2, READ_WRITE_ALL = 3, IGNORE = 4
202intQueryDetailMetricsSize
201intQueryParallelism
6boolReadFromBackup
303intRebalanceBatchSize
304longRebalanceBatchesPrefetchCount
301longRebalanceDelay (milliseconds)
300intRebalanceMode, SYNC = 0, ASYNC = 1, NONE = 2
305intRebalanceOrder
306longRebalanceThrottle (milliseconds)
302longRebalanceTimeout (milliseconds)
205boolSqlEscapeAll
204intSqlIndexInlineMaxSize
203stringSqlSchema
4intWriteSynchronizationMode, FULL_SYNC = 0, FULL_ASYNC = 1, PRIMARY_SYNC = 2
401int + CacheKeyConfiguration * count

CacheKeyConfiguration count

CacheKeyConfiguration
stringType name
stringAffinity key field name
200int + QueryEntity * count
QueryEntity
stringKey type name
stringValue type name
stringTable name
stringKey field name
stringValue field name
intQueryField count
QueryField * count
QueryField
stringName
stringType name
boolIs key field
boolIs NotNull constraint field
intAlias count
(string + string) * countField name aliases
intQueryIndex count
QueryIndex * count
QueryIndex
stringIndex name
byteIndex type, SORTED = 0, FULLTEXT = 1, GEOSPATIAL = 2
intInline size
intField count
(string + bool) * countFields (name + IsDescensing)




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. 

...