...
Ignite will provide out-of-box mapping from standard platform types (Java, C#, C++) to built-in primitives. A user will be able to alter this mapping using some external mechanism (e.g. annotations to map long values to Number). Standard mapping is listed in the table below:
Built-in | JavaC# | .NET | C++ |
---|---|---|---|
Bitmask(n) | BitSet | byte[] | |
Int8 | byte (Byte if nullable) | sbyte | |
Uint8 | short with range constraints | byte | |
Int16 | short (Short if nullable) | short | |
Uint16 | int with range constratints | ushort | |
Int32 | int (Integer if nullable) | int | |
Uint32 | long with range constratints | uint | |
Int64 | long (Long if nullable) | long | |
Uint64 | BigInteger with range constratints | ulong | |
Float | float (Float if nullable) | float | |
Double | double (Double if nullable) | double | |
Number([n]) | BigInteger | BigInteger | |
Decimal | BigDecimal | decimal | |
UUID | UUID | Guid | |
String | String | string | |
Date | LocalDate | NodaTime.LocalDate | |
Time | LocalTime | NodaTime.LocalTime | |
Datetime | LocalDateTime | NodaTime.LocalDateTime | |
Instant | Date (Instant?) | NodaTime.Instant | |
BLOB | byte[] | byte[] |
Java has no native support for unsigned types. We still can introduce 'unsigned' flag to schema type or separate binary type-codes, and allow to map to the closest types of wider range. E.g. map Uint8 → short and recheck constraints during serialization.
...