Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
import hazelcast
# Start the Hazelcast Client and connect to an already running Hazelcast Cluster on 127.0.0.1
client = hazelcast.HazelcastClient()
# Get a Replicated Map called "my-replicated-map"
rmap = client.get_replicated_map("my-replicated-map").blocking()
# Put and Get a value from the Replicated Map
replaced_value = rmap.put("key", "value")
# key/value replicated to all members
print("replaced value =", replaced_value)
# Will be None as its first update
value = rmap.get("key")
# the value is retrieved from a random member in the cluster
print("value for key =", value)
# Shutdown this Hazelcast Client
client.shutdown()