pyignite.datatypes.complex module¶
-
class
pyignite.datatypes.complex.
Map
¶ Bases:
pyignite.datatypes.base.IgniteDataType
Dictionary type, payload-only.
Ignite does not track the order of key-value pairs in its caches, hence the ordinary Python dict type, not the collections.OrderedDict.
-
HASH_MAP
= 1¶
-
LINKED_HASH_MAP
= 2¶
-
classmethod
build_header
()¶
-
classmethod
from_python
(value, type_id=None)¶
-
classmethod
parse
(client: Client)¶
-
classmethod
to_python
(ctype_object, *args, **kwargs)¶
-
-
class
pyignite.datatypes.complex.
ObjectArrayObject
¶ Bases:
pyignite.datatypes.base.IgniteDataType
Array of objects of any type. Its Python representation is tuple(type_id, iterable of any type).
-
classmethod
build_header
()¶
-
classmethod
from_python
(value)¶
-
classmethod
parse
(client: Client)¶
-
classmethod
to_python
(ctype_object, *args, **kwargs)¶
-
type_code
= b'\x17'¶
-
type_or_id_name
= 'type_id'¶
-
classmethod
-
class
pyignite.datatypes.complex.
CollectionObject
¶ Bases:
pyignite.datatypes.complex.ObjectArrayObject
Just like object array, but contains deserialization type hint instead of type id. This hint is also useless in Python, because the list type along covers all the use cases.
Also represented as tuple(type_id, iterable of any type) in Python.
-
classmethod
build_header
()¶
-
default
= []¶
-
pythonic
¶ alias of
builtins.list
-
type_code
= b'\x18'¶
-
type_or_id_name
= 'type'¶
-
classmethod
-
class
pyignite.datatypes.complex.
MapObject
¶ Bases:
pyignite.datatypes.complex.Map
This is a dictionary type. Type conversion hint can be a HASH_MAP (ordinary dict) or LINKED_HASH_MAP (collections.OrderedDict).
Keys and values in map are independent data objects, but count counts pairs. Very annoying.
-
classmethod
build_header
()¶
-
default
= {}¶
-
classmethod
from_python
(value)¶
-
pythonic
¶ alias of
builtins.dict
-
classmethod
to_python
(ctype_object, *args, **kwargs)¶
-
type_code
= b'\x19'¶
-
classmethod
-
class
pyignite.datatypes.complex.
WrappedDataObject
¶ Bases:
pyignite.datatypes.base.IgniteDataType
One or more binary objects can be wrapped in an array. This allows reading, storing, passing and writing objects efficiently without understanding their contents, performing simple byte copy.
Python representation: tuple(payload: bytes, offset: integer). Offset points to the root object of the array.
-
classmethod
build_header
()¶
-
classmethod
from_python
(value)¶
-
classmethod
parse
(client: Client)¶
-
classmethod
to_python
(ctype_object, *args, **kwargs)¶
-
type_code
= b'\x1b'¶
-
classmethod
-
class
pyignite.datatypes.complex.
BinaryObject
¶ Bases:
pyignite.datatypes.base.IgniteDataType
-
COMPACT_FOOTER
= 32¶
-
HAS_RAW_DATA
= 4¶
-
HAS_SCHEMA
= 2¶
-
OFFSET_ONE_BYTE
= 8¶
-
OFFSET_TWO_BYTES
= 16¶
-
USER_TYPE
= 1¶
-
classmethod
build_header
()¶
-
classmethod
from_python
(value: object)¶
-
static
get_dataclass
(client: Client, header) → collections.OrderedDict¶
-
classmethod
offset_c_type
(flags: int)¶
-
classmethod
parse
(client: Client)¶
-
classmethod
schema_type
(flags: int)¶
-
classmethod
to_python
(ctype_object, client: Client = None, *args, **kwargs)¶
-
type_code
= b'g'¶
-