Executor

class Executor(service_name, name, context)

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 – The specified key.

  • task – A task executed on the owner of the specified key.

Returns

future representing pending completion of the task.

Return type

hazelcast.future.Future

execute_on_member(member, task)

Executes a task on the specified member.

Parameters
Returns

Future representing pending completion of the task.

Return type

hazelcast.future.Future

execute_on_members(members, task)

Executes a task on each of the specified members.

Parameters
Returns

Futures representing pending completion of the task on each member.

Return type

list[hazelcast.future.Future]

execute_on_all_members(task)

Executes a task on all of the known cluster members.

Parameters

task – The task executed on the all of the members.

Returns

Futures representing pending completion of the task on each member.

Return type

list[hazelcast.future.Future]

is_shutdown()

Determines whether this executor has been shutdown or not.

Returns

True if the executor has been shutdown, False otherwise.

Return type

hazelcast.future.Future[bool]

shutdown()

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

Returns

Return type

hazelcast.future.Future[None]