Hazelcast Client

class HazelcastClient(config=None)

Bases: object

Hazelcast Client.

logger = <logging.Logger object>
get_atomic_long(name)

Creates cluster-wide AtomicLong.

Parameters:name – (str), name of the AtomicLong proxy.
Returns:(AtomicLong), AtomicLong proxy for the given name.
get_atomic_reference(name)

Creates cluster-wide AtomicReference.

Parameters:name – (str), name of the AtomicReference proxy.
Returns:(AtomicReference), AtomicReference proxy for the given name.
get_count_down_latch(name)

Creates cluster-wide CountDownLatch.

Parameters:name – (str), name of the CountDownLatch proxy.
Returns:(CountDownLatch), CountDownLatch proxy for the given name.
get_executor(name)

Creates cluster-wide Executor.

Parameters:name – (str), name of the Executor proxy.
Returns:(Executor), Executor proxy for the given name.
get_id_generator(name)

Creates cluster-wide IdGenerator.

Parameters:name – (str), name of the IdGenerator proxy.
Returns:(IdGenerator), IdGenerator proxy for the given name.
get_queue(name)

Returns the distributed queue instance with the specified name.

Parameters:name – (str), name of the distributed queue.
Returns:(Queue), distributed queue instance with the specified name.
get_list(name)

Returns the distributed list instance with the specified name.

Parameters:name – (str), name of the distributed list.
Returns:(List), distributed list instance with the specified name.
get_lock(name)

Returns the distributed lock instance with the specified name.

Parameters:name – (str), name of the distributed lock.
Returns:(Lock), distributed lock instance with the specified name.
get_map(name)

Returns the distributed map instance with the specified name.

Parameters:name – (str), name of the distributed map.
Returns:(Map), distributed map instance with the specified name.
get_multi_map(name)

Returns the distributed MultiMap instance with the specified name.

Parameters:name – (str), name of the distributed MultiMap.
Returns:(MultiMap), distributed MultiMap instance with the specified name.
get_reliable_topic(name)

Returns the ReliableTopic instance with the specified name.

Parameters:name – (str), name of the ReliableTopic.
Returns:(ReliableTopic), the ReliableTopic.
get_replicated_map(name)

Returns the distributed ReplicatedMap instance with the specified name.

Parameters:name – (str), name of the distributed ReplicatedMap.
Returns:(ReplicatedMap), distributed ReplicatedMap instance with the specified name.
get_ringbuffer(name)

Returns the distributed RingBuffer instance with the specified name.

Parameters:name – (str), name of the distributed RingBuffer.
Returns:(RingBuffer), distributed RingBuffer instance with the specified name.
get_semaphore(name)

Returns the distributed Semaphore instance with the specified name.

Parameters:name – (str), name of the distributed Semaphore.
Returns:(Semaphore), distributed Semaphore instance with the specified name.
get_set(name)

Returns the distributed Set instance with the specified name.

Parameters:name – (str), name of the distributed Set.
Returns:(Set), distributed Set instance with the specified name.
get_topic(name)

Returns the Topic instance with the specified name.

Parameters:name – (str), name of the Topic.
Returns:(Topic), the Topic.
new_transaction(timeout=120, durability=1, type=1)

Creates a new Transaction associated with the current thread using default or given options.

Parameters:
  • timeout – (long), the timeout in seconds determines the maximum lifespan of a transaction. So if a transaction is configured with a timeout of 2 minutes, then it will automatically rollback if it hasn’t committed yet.
  • durability – (int), the durability is the number of machines that can take over if a member fails during a

transaction commit or rollback :param type: (Transaction Type), the transaction type which can be TWO_PHASE or ONE_PHASE :return: (Transaction), new Transaction associated with the current thread.

shutdown()

Shuts down this HazelcastClient.