Package multi :: Module slave_commands :: Class Slave_storage_command
[hide private]
[frames] | no frames]

Class Slave_storage_command

source code


Special command for sending data for storage on the slaves.

Instance Methods [hide private]
 
__init__(self)
Set up the command.
source code
 
add(self, name, value)
Pump in data to be held and transfered to the slave by the command.
source code
 
clear(self)
Remove all data from the slave.
source code
 
run(self, processor, completed)
Set the slave processor's do_quit flag to terminate.
source code

Inherited from Slave_command: set_memo_id

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Set up the command.

Overrides: object.__init__

add(self, name, value)

source code 

Pump in data to be held and transfered to the slave by the command.

Parameters:
  • name (str) - The name of the data structure to store.
  • value (anything) - The data structure.

run(self, processor, completed)

source code 

Set the slave processor's do_quit flag to terminate.

Parameters:
  • processor (Processor instance) - The slave processor the command is running on. Results from the command are returned via calls to processor.return_object.
  • completed (bool) - The flag used in batching result returns to indicate that the sequence of batched result commands has completed. This value should be returned via the last result object retuned by this method or methods it calls. All other Result_commands should be initialised with completed=False. This is an optimisation to prevent the sending an extra batched result queue completion result command being sent, it may be an over early optimisation.
Overrides: Slave_command.run