Executor

class Executor(client, service_name, name)

Bases: hazelcast.proxy.base.Proxy

An object that executes submitted executable tasks.

execute_on_key_owner(key, task)

Executes a task on the owner of the specified key.

Parameters:
  • key – (object), the specified key.
  • task – (Task), a task executed on the owner of the specified key.
Returns:

(Future), future representing pending completion of the task.

execute_on_member(member, task)

Executes a task on the specified member.

Parameters:
  • member – (Member), the specified member.
  • task – (Task), the task executed on the specified member.
Returns:

(Future), Future representing pending completion of the task.

execute_on_members(members, task)

Executes a task on each of the specified members.

Parameters:
  • members – (Collection), the specified members.
  • task – (Task), the task executed on the specified members.
Returns:

(Map), Future tuples representing pending completion of the task on each member.

execute_on_all_members(task)

Executes a task on all of the known cluster members.

Parameters:task – (Task), the task executed on the all of the members.
Returns:(Map), Future tuples representing pending completion of the task on each member.
is_shutdown()

Determines whether this executor has been shut down or not.

Returns:(bool), true if this executor has been shut down.
shutdown()

Initiates a shutdown process which works orderly. Tasks that were submitted before shutdown are executed but new task will not be accepted.