Skip to content

Commit 4c7d3f4

Browse files
committed
Merge branch 'master' into asyncio-reliabletopic
# Conflicts: # hazelcast/internal/asyncio_client.py # hazelcast/internal/asyncio_proxy/manager.py
2 parents 495ddc1 + 94e769f commit 4c7d3f4

4 files changed

Lines changed: 672 additions & 0 deletions

File tree

hazelcast/internal/asyncio_client.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
MAP_SERVICE,
2727
MULTI_MAP_SERVICE,
2828
ProxyManager,
29+
QUEUE_SERVICE,
2930
RELIABLE_TOPIC_SERVICE,
3031
REPLICATED_MAP_SERVICE,
3132
RINGBUFFER_SERVICE,
@@ -34,6 +35,7 @@
3435
from hazelcast.internal.asyncio_proxy.list import List
3536
from hazelcast.internal.asyncio_proxy.map import Map
3637
from hazelcast.internal.asyncio_proxy.multi_map import MultiMap
38+
from hazelcast.internal.asyncio_proxy.queue import Queue
3739
from hazelcast.internal.asyncio_proxy.reliable_topic import ReliableTopic
3840
from hazelcast.internal.asyncio_proxy.replicated_map import ReplicatedMap
3941
from hazelcast.internal.asyncio_proxy.ringbuffer import Ringbuffer
@@ -289,6 +291,17 @@ async def get_multi_map(self, name: str) -> MultiMap[KeyType, ValueType]:
289291
"""
290292
return await self._proxy_manager.get_or_create(MULTI_MAP_SERVICE, name)
291293

294+
async def get_queue(self, name: str) -> Queue[KeyType]:
295+
"""Returns the distributed queue instance with the specified name.
296+
297+
Args:
298+
name: Name of the distributed queue.
299+
300+
Returns:
301+
Distributed queue instance with the specified name.
302+
"""
303+
return await self._proxy_manager.get_or_create(QUEUE_SERVICE, name)
304+
292305
async def get_replicated_map(self, name: str) -> ReplicatedMap[KeyType, ValueType]:
293306
"""Returns the distributed ReplicatedMap instance with the specified
294307
name.

hazelcast/internal/asyncio_proxy/manager.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from hazelcast.internal.asyncio_proxy.list import create_list_proxy
55
from hazelcast.internal.asyncio_proxy.multi_map import create_multi_map_proxy
6+
from hazelcast.internal.asyncio_proxy.queue import create_queue_proxy
67
from hazelcast.internal.asyncio_proxy.vector_collection import (
78
create_vector_collection_proxy,
89
)
@@ -19,6 +20,7 @@
1920
LIST_SERVICE = "hz:impl:listService"
2021
MAP_SERVICE = "hz:impl:mapService"
2122
MULTI_MAP_SERVICE = "hz:impl:multiMapService"
23+
QUEUE_SERVICE = "hz:impl:queueService"
2224
RELIABLE_TOPIC_SERVICE = "hz:impl:reliableTopicService"
2325
REPLICATED_MAP_SERVICE = "hz:impl:replicatedMapService"
2426
RINGBUFFER_SERVICE = "hz:impl:ringbufferService"
@@ -92,6 +94,7 @@ async def create_reliable_topic_proxy(service_name, name, context):
9294
LIST_SERVICE: create_list_proxy,
9395
MAP_SERVICE: create_map_proxy,
9496
MULTI_MAP_SERVICE: create_multi_map_proxy,
97+
QUEUE_SERVICE: create_queue_proxy,
9598
RELIABLE_TOPIC_SERVICE: create_reliable_topic_proxy,
9699
REPLICATED_MAP_SERVICE: create_replicated_map_proxy,
97100
RINGBUFFER_SERVICE: create_ringbuffer_proxy,

0 commit comments

Comments
 (0)