IceGrid.Query

class IceGrid.Query

Bases: Object, ABC

Finds well-known Ice objects registered with the IceGrid registry.

Notes

The Slice compiler generated this skeleton class from Slice interface ::IceGrid::Query.

abstractmethod findAllObjectsByType(type: str, current: Current) Sequence[ObjectPrx | None] | Awaitable[Sequence[ObjectPrx | None]]

Finds all the well-known objects with the given type.

Parameters:
  • type (str) – The object type.

  • current (Ice.Current) – The Current object for the dispatch.

Returns:

A list of proxies to the well-known objects with the specified type. Can be empty.

Return type:

Sequence[ObjectPrx | None] | Awaitable[Sequence[ObjectPrx | None]]

abstractmethod findAllReplicas(proxy: ObjectPrx | None, current: Current) Sequence[ObjectPrx | None] | Awaitable[Sequence[ObjectPrx | None]]

Finds all the replicas of a well-known object.

Parameters:
  • proxy (ObjectPrx | None) – A proxy that identifies the well-known object.

  • current (Ice.Current) – The Current object for the dispatch.

Returns:

A list of proxies to the replicas of the well-known object specified by proxy. Can be empty.

Return type:

Sequence[ObjectPrx | None] | Awaitable[Sequence[ObjectPrx | None]]

abstractmethod findObjectById(id: Identity, current: Current) ObjectPrx | None | Awaitable[ObjectPrx | None]

Finds a well-known object by identity.

Parameters:
  • id (Identity) – The identity.

  • current (Ice.Current) – The Current object for the dispatch.

Returns:

A proxy to the well-known object, or null if no such object is registered.

Return type:

ObjectPrx | None | Awaitable[ObjectPrx | None]

abstractmethod findObjectByType(type: str, current: Current) ObjectPrx | None | Awaitable[ObjectPrx | None]

Finds a well-known object by type. If there are several objects registered for the given type, the object is randomly selected.

Parameters:
  • type (str) – The object type.

  • current (Ice.Current) – The Current object for the dispatch.

Returns:

A proxy to a well-known object with the specified type, or null if no such object is registered.

Return type:

ObjectPrx | None | Awaitable[ObjectPrx | None]

abstractmethod findObjectByTypeOnLeastLoadedNode(type: str, sample: LoadSample, current: Current) ObjectPrx | None | Awaitable[ObjectPrx | None]

Finds a well-known object by type on the least-loaded node. If the registry does not know which node hosts the object (for example, because the object was registered with a direct proxy), the registry assumes the object is hosted on a node that has a load average of 1.0.

Parameters:
  • type (str) – The object type.

  • sample (LoadSample) – The sampling interval.

  • current (Ice.Current) – The Current object for the dispatch.

Returns:

A proxy to the well-known object, or null if no such object is registered.

Return type:

ObjectPrx | None | Awaitable[ObjectPrx | None]

static ice_staticId() str

Obtain the type ID of the Slice interface.

Returns:

The type ID.

Return type:

str