Hitachi

In-Memory Data Grid Hitachi Elastic Application Data Store


15.2.2 Data that is supported as keys, group names, values, cache names, and EADS client names

This subsection explains the data that can be specified for keys, group names, values, cache names, and EADS client names.

Organization of this subsection

(1) Data types that can be specified as keys

This subsection explains the format of keys and the data that can be specified.

(a) Format of keys

key=
  [group-name:]element-name

When a key is not grouped, element-name is the key. When a key is grouped, a set of group-names, delimiters (:), and an element-name constitutes the key. Therefore, keys with the same element-name but a difference in the group-names are different keys.

For the format of group-name, see 15.2.2(2) Data that can be specified as group names.

The following shows examples of key specifications:

  • Key that is not grouped

    key1
  • Key that is grouped

    group1:key1
  • Key whose groups are arranged hierarchically

    group1:group2:key1

(b) Data types and number of characters that can be specified as keys

The table below lists and describes the data types and the number of characters that can be specified as keys in each programming language used to create application programs. When a key is grouped, the maximum length is 1,024 characters including the group names, delimiters (:), and element name.

Table 15‒1: Data types that can be specified as keys

Programming language for application programs

Data type supported as keys

Number of characters

Remarks

Java

Character string (java.lang.String)

1 to 1,024

Specifying null or the null character string is invalid.

C

Character string ending with the terminal symbol \0 (char *)

1 to 1,024

  • The maximum size of a character string is in bytes with \0 excluded.

  • A character string with a length of zero (\0 only) is not permitted.

Important note

The eztool put, eztool get, and eztool remove commands can be used to test the configured execution environment to determine whether it is running normally. Therefore, the data types and sizes permitted in the commands are not completely compatible with those permitted in API functions (put, get, remove).

(c) Key specification rules

This subsection explains the rules for specifying keys.

  • The ASCII codes 0x20 through 0x7E are supported for specifying keys.

    Note that the characters listed in the following table cannot be used in keys, except as noted, because they are EADS reserved characters.

    Table 15‒2: Characters that cannot be used in keys

    ASCII code

    Character

    Exception

    0x22

    Double quotation mark (")

    None

    0x28

    Left parenthesis (()

    None

    0x29

    Right parenthesis ())

    None

    0x3a

    Colon (:)

    This character can be specified only as a delimiter between group hierarchy names and an element name. This character cannot be used within a group hierarchy name or an element name.

    0x3c

    Less-than sign (<)

    None

    0x3e

    Greater-than sign (>)

    None

    0x5b

    Left square bracket ([)

    These characters can be used only when EADS server IDs of storage EADS servers are specified in EADS server ID specified groups.

    0x5d

    Right square bracket (])

    0x7c

    Vertical bar (|)

    None

(2) Data that can be specified as group names

This subsection explains the format of group names and the data that can be specified.

(a) Format of group name

group-name=
 group-hierarchy-name[:group-hierarchy-name]...

You can specify as a group name a set consisting of a group hierarchy name in a desired hierarchy through the group hierarchy name in the highest hierarchy. A name beginning with an intermediate group hierarchy name cannot be specified.

When group names are specified in an API function, a name beginning with an intermediate group hierarchy name cannot be specified. For example, if a key is groupA:groupB:groupC:key, a group name beginning with groupB:groupC cannot be specified.

The following examples show the relationship between group names.

  • Group names that can be specified when the key is groupA:groupB:groupC:key

    groupA
    groupA:groupB
    groupA:groupB:groupC
  • Group names that can be specified when the key is [10]group1:group2:key

    [10]group1
    [10]group1:group2

(b) EADS server ID specified groups

If you group keys by specifying a key storage EADS server, specify the EADS server ID of the EADS server where the keys are stored. This type of group is called an EADS server ID specified group.

The following shows the format of keys that contain an EADS server ID specified group:

[EADS-server-ID]group-hierarchy-name:[group-hierarchy-name:]...element-name

When you use an EADS server ID specified group to group a key, specify the EADS server ID enclosed in square brackets ([]) as the key's first group hierarchy name (the left square bracket ([) and the right square bracket (]) in [EADS-server-ID] must be specified, as shown in the format; these square brackets do not mean that the enclosed item can be omitted). Specify for the EADS server ID an integer that does not begin with zero.

A set of a left square bracket ([), an EADS server ID, and a right square bracket (]) is treated as a group name.

The following example shows a key that contains an EADS server ID specified group:

[1]group1:key1

(c) Data types and the number of characters that can be specified as group names

For details about the data types supported for group names, see 15.2.2(1)(b) Data types and number of characters that can be specified as keys. When keys are grouped, the maximum length is 1,024 characters including the group names, delimiters (:), and element name. Therefore, a maximum of 1,022 characters are permitted for the group names.

(d) Group name specification rules

This subsection explains the rules for specifying group names. For other rules and notes, see 15.2.2(1)(c) Key specification rules.

  • When keys are grouped, there is no upper limit to the number of groups and group hierarchies that can be created.

    Note that when groups are arranged in a hierarchy, the processing time increases as the hierarchy goes to lower levels. It is advisable to configure hierarchies appropriately.

  • When an EADS server ID specified group is used, the EADS server ID of an EADS server that does not exist in the cluster cannot be specified.

(3) Data types that can be specified as values

The following table lists and describes the data types and sizes that can be specified as values in each programming language used to create application programs.

Table 15‒3: Data types that can be specified as values

Programming language for application programs

Data type supported as values

Size

(bytes)

Remarks

Java

Any object that can be serialized (java.lang.Object)

1 to 262,144

  • This is the length of a serialized byte array.

  • Specifying null is invalid.

C

Any byte array (void *)

1 to 262,144

This is the length of any byte array.

Important note
  • The permitted data types and sizes are not completely compatible between the API functions (put, get, remove) and the commands (eztool put, eztool get, eztool remove).

  • If your Java client application program or user function and C client application program handle the same keys, use byte arrays for values. The values stored as byte arrays by the Java client application program or user function can be acquired by the C client application program. If a C client application program acquires values that are not byte arrays, an error results.

    The values stored by the C client application program can be acquired as byte arrays by the Java client application program or a user function.

(4) Data types that can be specified as cache names

The following table lists and describes the data types and the number of characters that can be specified as cache names in each programming language used to create application programs.

Table 15‒4: Data types that can be specified as cache names

Programming language for application programs

Data type supported as cache names

Number of characters

Remarks

Java

Character string (java.lang.String)

1 to 32

  • The permitted characters are 0x20 through 0x7E in ASCII codes.

  • Specifying null or the null character string is invalid.

C

Character string ending with the terminal symbol \0 (char *)

1 to 32

  • The permitted characters are 0x20 through 0x7E in ASCII codes.

  • The maximum size of a character string is in bytes with \0 excluded.

  • A character string with a length of zero (\0 only) is not permitted.

(5) Data that can be specified as EADS client names

The following table lists and describes the data types and the number of characters that can be specified as EADS client names in each programming language that can be used to create application programs.

Table 15‒5: Data that can be specified as EADS client names

Programming language for application programs

Data types supported as EADS client names

Number of characters

Remarks

Java

Character string (java.lang.String)

0 to 16

  • Alphanumeric characters (0 to 9, A to Z, a to z) and underscores (_) are permitted.

  • A null character string is permitted.

  • Specifying null is invalid.

C

Character string ending with the terminal symbol \0 (char *)

0 to 16

  • Alphanumeric characters (0 to 9, A to Z, a to z) and underscores (_) are permitted.

  • The maximum size of a character string is in bytes with \0 excluded.

  • A character string with a length of zero (\0 only) is permitted.