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
17 changes: 14 additions & 3 deletions hazelcast/internal/asyncio_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from hazelcast.internal.asyncio_compact import CompactSchemaService
from hazelcast.config import Config, IndexConfig
from hazelcast.internal.asyncio_connection import ConnectionManager, DefaultAsyncioAddressProvider
from hazelcast.core import DistributedObjectEvent, DistributedObjectInfo
from hazelcast.core import DistributedObjectEvent
from hazelcast.discovery import HazelcastCloudAddressProvider
from hazelcast.errors import IllegalStateError, InvalidConfigurationError
from hazelcast.internal.asyncio_invocation import InvocationService, Invocation
Expand All @@ -18,20 +18,20 @@
from hazelcast.internal.asyncio_partition import PartitionService, InternalPartitionService
from hazelcast.protocol.codec import (
client_add_distributed_object_listener_codec,
client_get_distributed_objects_codec,
client_remove_distributed_object_listener_codec,
dynamic_config_add_vector_collection_config_codec,
)
from hazelcast.internal.asyncio_proxy.manager import (
LIST_SERVICE,
MAP_SERVICE,
MULTI_MAP_SERVICE,
ProxyManager,
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.multi_map import MultiMap
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 +274,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_multi_map(self, name: str) -> MultiMap[KeyType, ValueType]:
"""Returns the distributed MultiMap instance with the specified name.

Args:
name: Name of the distributed MultiMap.

Returns:
Distributed MultiMap instance with the specified name.
"""
return await self._proxy_manager.get_or_create(MULTI_MAP_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.multi_map import create_multi_map_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"
MULTI_MAP_SERVICE = "hz:impl:multiMapService"
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,
MULTI_MAP_SERVICE: create_multi_map_proxy,
REPLICATED_MAP_SERVICE: create_replicated_map_proxy,
VECTOR_SERVICE: create_vector_collection_proxy,
}
Expand Down
Loading
Loading