space
|
Required. Specify the name of the space that is to be created.
|
field
|
Required.
The data type for a field must be one of the following: boolean, char, short, integer, long, float, double, string, datetime, blob.
|
nullable
|
Optional. Can be either true or false (no quotes). By default is equal to false. If a field has nullable set to true, tuples put into the space do not need to contain a field with that name.
|
encrypted
|
Optional. If the field is not a key field or an index field and you have enabled ActiveSpaces security, you can specify that the data in the field is encrypted. Each (non-key, non-index) field can be made encrypted, as long as the policy for the corresponding domain allows it.
|
key
|
Required. Identifies one or more fields (already specified with the field parameter) that will serve as a unique key for the space.
When you enter the key parameter, you can optionally specify the index type of the key field by including the type keyword. For example:
key (type "hash" fields (...))
The fields keyword is required.
The type keyword is optional. The default index type is the “hash” index type.
|
index
|
Optional. Identifies one or more fields already specified with the “field” parameter that will serve as a secondary index. You can specify an index name and index type to be used by entering:
index (name "index1" type "tree" fields (...))
The name keyword is required.
The type keyword is optional. The default is index type is “tree.”
The fields keyword and fields are required
You can specify as many indexes as desired by specifying the indexes, one by one, after the key parameter. You just need to put them one after other after the key field. For example:
key (...) index(name "index1" ...) index(name "index2" ...) index (name "index3" ...)
|
distribution_fields
|
Defines one or more fields as distribution fields. If a field is defined as a distribution field, then all tuples that have an identical data value for the field are stored on the same seeder.
Attention: The distribution fields must be a subset of the key fields. Otherwise, ActiveSpaces throws an exception.
The following example shows how to set up distribution fields:
key (fields ('KEY','field0','field1','field2')) distribution_fields ('KEY','field0','field1','field2') distribution_policy 'distributed' replication_count 0
In the example, field0, field1, and field2 are defined as key fields and also as distribution fields.
Note: If you define fields as distribution fields, then you must also set distribution_policy to distributed.
|
distribution_policy
|
Optional. Determines whether management of entries in the space is shared among the seeders that have joined the space (distributed) or a single seeder is responsible for all entries in the space (non_distributed). The default value is
distributed.
Note: If you define fields as distribution def fields, then you must also set distribution_policy to distributed.
|
replication_count
|
Optional. An integer that specifies the number of times each entry should be replicated on different seeders (default: 0).
|
replication_policy
|
Optional. A value of
sync
specifies that replication is done in synchronous mode for the space, before the operation returns. When an operation modifies one of the entries in the space, the operation only returns an indication of success when that modification has been positively replicated up to the degree of replication required for the space. A value of
async specifies that replication is asynchronous.
|
host_aware_replication
|
Optional. A boolean indicating whether host aware replication is enabled or disabled. Host aware replication ensures that data is not replicated on any seeders specified to be in the same seeder group (default: true, host aware replication is enabled).
|
persistence_type
|
Optional. Specifies whether persistence is enabled for the space, and if so, what type of persistence to use.
To specify no persistence, specify
none. To specify shared all persistence (space members designated as persisters maintain data on disk), specify
shared-all. To specify shared-nothing persistence (each member maintains data on disk), specify
share_nothing.
|
persistence_policy
|
Optional. Specifies the what type of communication is used to maintain persistence: synchronous (sync) or asynchronous (async).
|
file_sync_interval
|
A long integer that indicates the amount of time (in milliseconds) to wait between persists to the data store when asynchronous, versus shared-nothing persistence is used (default: 10000).
|
min_seeders
|
Optional. Specifies the minimum number of seeders that should be joined to the space before the space becomes ready to accept operations. The default value is 1.
|
capacity
|
Optional. Specifies a maximum number of entries per seeder for the space. When the capacity is reached the result of any additional request to put (insert) a new entry in the space will depend on the value of the
eviction_policy attribute. The default value is -1 (no capacity).
|
eviction_policy
|
Optional. If a put operation on a space would cause a seeder to exceed the space's
capacity attribute, then the value of this attribute will dictate the result of this operation: if the value is 'none' (in quotes) then there will be no eviction and the operation will fail because the seeder is already at capacity. If the value is 'lru' (in quotes) then the seeder will evict another entry from the space using the 'least recently used' eviction algorithm. The default value is 'none' (no eviction).
|
ttl
|
Optional. Time to live in milliseconds. The default is -1 (forever).
|
lock_ttl
|
Optional. Specifies in milliseconds the duration of a lock placed on the space. The default is -1 (forever).
|
lock_wait
|
Optional. For a space that is locked, specifies how long a member process will wait for it to become unlocked. The default is 0. Other accepted values are only positive values. The unit of measure is milliseconds.
|
lock_scope
|
Optional. Specifies the lock scope to be used for each operation that includes locking.
You can specify the following:
|
space_wait
|
Specifies the space wait for the specified space.
The space wait value is a timeout that applies to operations that cannot be processed because the space is not in the READY state, i.e., the space in the INITIAL, LOADING, RECOVER, or SUSPEND state.
|
write_timeout
|
A long integer indicating the amount of time (in milliseconds) a write operation on the space can be blocked from completing the write before failing (default: 60000.)
|
query_timeout
|
A long integer indicating the amount of time (in milliseconds) a query on the space can take to return its results (default: -1, take forever).
|
query_limit
|
A long integer specifying the maximum number of entries to be returned by a query on this space (default 10000). The query_limit setting is intended to help you prevent large queries from exhausting the system's memory. By default, all browsers and listeners use the query_limit defined for the space they are browsing or listening on.
Note: When there are multiple seeders for a space, the query limit is divided evenly amongst the seeders of the space so that an even number of resulting entries is taken from each seeder. When the number of entries in the result of a query approaches the query limit, it is possible that some seeders might return fewer entries than others. This is because the algorithm ActiveSpaces uses to distribute entries amongst seeders does not guarantee the entries will be evenly distributed. You should adjust the query_limit setting to accommodate the largest number of entries you will allow queries to return. When doing so, keep in mind that the query_limit should be slightly larger than the intended amount to account for the uneven distribution of entries amongst seeders.
|
read_timeout
|
A long integer indicating the amount of time (in milliseconds) a read operation on the space can be blocked from completing the read before failing. (default: 60000).
|
forget_old_value
|
A boolean value indicating whether operations that update entries in the space return any existing values for the entries (default: false, values are returned).
|
virtual_node_count
|
An integer that represents the capacity of each seeder for consistent hashing. (default: 1000).
|
routed
|
A boolean value indicating whether updates to the space can be routed between sites (default: false).
|