Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions hazelcast/internal/asyncio_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,14 @@
LIST_SERVICE,
MAP_SERVICE,
ProxyManager,
QUEUE_SERVICE,
REPLICATED_MAP_SERVICE,
VECTOR_SERVICE,
)
from hazelcast.internal.asyncio_proxy.base import Proxy
from hazelcast.internal.asyncio_proxy.list import List
from hazelcast.internal.asyncio_proxy.map import Map
from hazelcast.internal.asyncio_proxy.queue import Queue
from hazelcast.internal.asyncio_proxy.replicated_map import ReplicatedMap
from hazelcast.internal.asyncio_reactor import AsyncioReactor
from hazelcast.serialization import SerializationServiceV1
Expand Down Expand Up @@ -274,6 +276,17 @@ async def get_map(self, name: str) -> Map[KeyType, ValueType]:
"""
return await self._proxy_manager.get_or_create(MAP_SERVICE, name)

async def get_queue(self, name: str) -> Queue[KeyType]:
"""Returns the distributed queue instance with the specified name.

Args:
name: Name of the distributed queue.

Returns:
Distributed queue instance with the specified name.
"""
return await self._proxy_manager.get_or_create(QUEUE_SERVICE, name)

async def get_replicated_map(self, name: str) -> ReplicatedMap[KeyType, ValueType]:
"""Returns the distributed ReplicatedMap instance with the specified
name.
Expand Down
3 changes: 3 additions & 0 deletions hazelcast/internal/asyncio_proxy/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import typing

from hazelcast.internal.asyncio_proxy.list import create_list_proxy
from hazelcast.internal.asyncio_proxy.queue import create_queue_proxy
from hazelcast.internal.asyncio_proxy.vector_collection import (
VectorCollection,
create_vector_collection_proxy,
Expand All @@ -15,6 +16,7 @@

LIST_SERVICE = "hz:impl:listService"
MAP_SERVICE = "hz:impl:mapService"
QUEUE_SERVICE = "hz:impl:queueService"
REPLICATED_MAP_SERVICE = "hz:impl:replicatedMapService"
VECTOR_SERVICE = "hz:service:vector"

Expand All @@ -24,6 +26,7 @@
] = {
LIST_SERVICE: create_list_proxy,
MAP_SERVICE: create_map_proxy,
QUEUE_SERVICE: create_queue_proxy,
REPLICATED_MAP_SERVICE: create_replicated_map_proxy,
VECTOR_SERVICE: create_vector_collection_proxy,
}
Expand Down
Loading
Loading