Backend API

class BackendAPI(name: str, port: int, backend_id: UUID, kv_host: str, kv_port: int)[source]
async is_ready(timeout: float | None = None, pause: float = 0.5)[source]
async register_objects(serialized_objects: Iterable[bytes], make_replica: bool)[source]
async make_persistent(serialized_objects: Iterable[bytes])[source]
async call_active_method(object_id: UUID, method_name: str, args: tuple[Any], kwargs: dict[str, Any], exec_constraints: dict[str, Any]) tuple[bytes, bool][source]

Entry point for calling an active method of a DataClayObject

async get_object_attribute(object_id: UUID, attribute: str) tuple[bytes, bool][source]

Returns value of the object attibute with ID provided :param object_id: ID of the object :param attribute: Name of the attibute

Returns:

The pickled value of the object attibute. If it’s an exception or not

async set_object_attribute(object_id: UUID, attribute: str, serialized_attribute: bytes) tuple[bytes, bool][source]

Updates an object attibute with ID provided

async del_object_attribute(object_id: UUID, attribute: str) tuple[bytes, bool][source]

Deletes an object attibute with ID provided

async get_object_properties(object_id: UUID) bytes[source]

Returns the properties of the object with ID provided

Parameters:

object_id – ID of the object

Returns:

The pickled properties of the object.

async update_object_properties(object_id: UUID, serialized_properties: bytes)[source]

Updates an object with ID provided with contents from another object

async new_object_version(object_id: UUID)[source]

Creates a new version of the object with ID provided

This entrypoint for new_version is solely for COMPSs (called from java).

Parameters:

object_id – ID of the object to create a new version from.

Returns:

The JSON-encoded metadata of the new DataClayObject version.

async consolidate_object_version(object_id: UUID)[source]

Consolidates the object with ID provided

async proxify_object(object_id: UUID, new_object_id: UUID)[source]

Proxify object with ID provided to new object ID

async change_object_id(object_id: UUID, new_object_id: UUID)[source]
async send_objects(object_ids: Iterable[UUID], backend_id: UUID, make_replica: bool, recursive: bool, remotes: bool)[source]
async stop()[source]
async flush_all()[source]
async move_all_objects()[source]
async new_object_replica(object_id: UUID, backend_id: UUID = None, recursive: bool = False, remotes: bool = True)[source]