Packagemvcexpress.mvc
Classpublic class PooledCommand
InheritancePooledCommand Inheritance Command Inheritance Object

Command that is automatically pooled.

Pooled commands improves performance as they need to be constructed only once. Use them with commands that are executed very often. You can lock() command to prevent it from being pooled after execute, locked commands are pooled after you unlock() them.



Public Properties
 PropertyDefined By
 InheritedcommandMap : CommandMap
Handles application Commands.
Command
  isLocked : Boolean
[read-only] Shows if command is locked, and will not be automatically pooling after execution, or not.
PooledCommand
 InheritedmediatorMap : MediatorMap
Handles application Mediators.
Command
 InheritedproxyMap : ProxyMap
Handles application Proxies.
Command
Public Methods
 MethodDefined By
 Inherited
Type of message that executed this command.
Command
  
lock():void
Locks PooledCommand to avoid automatic pooling after execution.
PooledCommand
  
unlock():void
Unlock and pool PooledCommand.
PooledCommand
Protected Methods
 MethodDefined By
 Inherited
sendMessage(type:String, params:Object = null):void
Sends a message with optional params object
Command
Property Detail
isLockedproperty
isLocked:Boolean  [read-only]

Shows if command is locked, and will not be automatically pooling after execution, or not. Asynchronous PooledCommand must be locked then used, and unlocked then they are done with there work.


Implementation
    public function get isLocked():Boolean
Method Detail
lock()method
public function lock():void

Locks PooledCommand to avoid automatic pooling after execution. Command lock(), unlock() functions are used with asynchronous commands.

unlock()method 
public function unlock():void

Unlock and pool PooledCommand. Only previously locked commands can be unlocked, or error will be thrown. Command lock(), unlock() functions are used with asynchronous commands.