pyignite.datatypes.complex module¶
- class pyignite.datatypes.complex.BinaryObject¶
Bases:
pyignite.datatypes.null_object.Nullable- COMPACT_FOOTER = 32¶
- HAS_RAW_DATA = 4¶
- HAS_SCHEMA = 2¶
- OFFSET_ONE_BYTE = 8¶
- OFFSET_TWO_BYTES = 16¶
- USER_TYPE = 1¶
- classmethod from_python_not_null(stream, value, **kwargs)¶
- async classmethod from_python_not_null_async(stream, value, **kwargs)¶
- classmethod get_header_class()¶
- classmethod hashcode(value: object, client: Optional[Client] = None) int¶
- async classmethod hashcode_async(value: object, client: Optional[AioClient] = None) int¶
- classmethod offset_c_type(flags: int)¶
- classmethod parse_not_null(stream)¶
- async classmethod parse_not_null_async(stream)¶
- classmethod schema_type(flags: int)¶
- classmethod to_python_not_null(ctypes_object, client: Client = None, **kwargs)¶
- async classmethod to_python_not_null_async(ctypes_object, client: AioClient = None, **kwargs)¶
- type_code = b'g'¶
- class pyignite.datatypes.complex.CollectionObject¶
Bases:
pyignite.datatypes.null_object.NullableSimilar to object array, but contains platform-agnostic deserialization type hint instead of type ID.
Represented as tuple(hint, iterable of any type) in Python. Hints are:
USER_SET− a set of unique Ignite thin data objects. The exact Java type of a set is undefined,USER_COL− a collection of Ignite thin data objects. The exact Java type of a collection is undefined,ARR_LIST− represents the java.util.ArrayList type,LINKED_LIST− represents the java.util.LinkedList type,HashSettype,LINKED_HASH_SET− represents the java.util.LinkedHashSet type,SINGLETON_LIST− represents the return type of the java.util.Collection.singletonList method.
It is safe to say that USER_SET (set in Python) and USER_COL (list) can cover all the imaginable use cases from Python perspective.
- ARR_LIST = 1¶
- HASH_SET = 3¶
- LINKED_HASH_SET = 4¶
- LINKED_LIST = 2¶
- SINGLETON_LIST = 5¶
- USER_COL = 0¶
- USER_SET = -1¶
- classmethod from_python_not_null(stream, value, *args, **kwargs)¶
- async classmethod from_python_not_null_async(stream, value, *args, **kwargs)¶
- classmethod parse_not_null(stream)¶
- async classmethod parse_not_null_async(stream)¶
- classmethod to_python_not_null(ctypes_object, *args, **kwargs)¶
- async classmethod to_python_not_null_async(ctypes_object, *args, **kwargs)¶
- type_code = b'\x18'¶
- class pyignite.datatypes.complex.Map¶
Bases:
pyignite.datatypes.base.IgniteDataType,pyignite.datatypes.complex._MapBaseDictionary 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.
- classmethod from_python(stream, value, type_id=None)¶
- async classmethod from_python_async(stream, value, type_id=None)¶
- classmethod parse(stream)¶
- async classmethod parse_async(stream)¶
- classmethod to_python(ctypes_object, **kwargs)¶
- async classmethod to_python_async(ctypes_object, **kwargs)¶
- class pyignite.datatypes.complex.MapObject¶
Bases:
pyignite.datatypes.null_object.Nullable,pyignite.datatypes.complex._MapBaseThis is a dictionary type.
Represented as tuple(type_id, value).
Type ID can be a
HASH_MAP(corresponds to an ordinary dict in Python) or aLINKED_HASH_MAP(collections.OrderedDict).- classmethod from_python_not_null(stream, value, **kwargs)¶
- async classmethod from_python_not_null_async(stream, value, **kwargs)¶
- classmethod parse_not_null(stream)¶
- async classmethod parse_not_null_async(stream)¶
- classmethod to_python_not_null(ctypes_object, **kwargs)¶
- async classmethod to_python_not_null_async(ctypes_object, **kwargs)¶
- type_code = b'\x19'¶
- class pyignite.datatypes.complex.ObjectArrayObject¶
Bases:
pyignite.datatypes.null_object.NullableArray of Ignite objects of any consistent type. Its Python representation is tuple(type_id, iterable of any type). The only type ID that makes sense in Python client is
OBJECT, that corresponds directly to the root object type in Java type hierarchy (java.lang.Object).- OBJECT = -1¶
- classmethod from_python_not_null(stream, value, *args, **kwargs)¶
- async classmethod from_python_not_null_async(stream, value, *args, **kwargs)¶
- classmethod parse_not_null(stream)¶
- async classmethod parse_not_null_async(stream)¶
- classmethod to_python_not_null(ctypes_object, **kwargs)¶
- async classmethod to_python_not_null_async(ctypes_object, **kwargs)¶
- type_code = b'\x17'¶
- class pyignite.datatypes.complex.WrappedDataObject¶
Bases:
pyignite.datatypes.null_object.NullableOne 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 from_python_not_null(stream, value, *args, **kwargs)¶
- classmethod parse_not_null(stream)¶
- classmethod to_python_not_null(ctypes_object, *args, **kwargs)¶
- type_code = b'\x1b'¶