| Package | system.process |
| Class | public class Cache |
| Inheritance | Cache Task Object |
Example :
import core.dump ;
import system.process.Cache ;
var object:Object = {} ;
object.a = 1 ;
object.b = 2 ;
object.c = 3 ;
object.d = 3 ;
object.method1 = function( value:uint ):void
{
this.c = value ;
};
object.method2 = function( value1:uint , value2:uint ):void
{
this.d = value1 + value2 ;
};
object.setPropertyIsEnumerable("method1", false) ;
object.setPropertyIsEnumerable("method2", false) ;
trace( core.dump( object ) ) ; // {b:2,d:3,a:1,c:3}
var cache:Cache = new Cache() ;
cache.enqueueAttribute("a", 10) ;
cache.enqueueAttribute("b", 20) ;
cache.enqueueMethod("method1", 30) ;
cache.enqueueMethod("method2", 40 , 50) ;
cache.target = object ;
cache.run() ; // flush the cache and initialize the target or invoked this methods.
trace( core.dump( object ) ) ; // {b:20,c:30,d:90,a:10}
| Property | Defined By | ||
|---|---|---|---|
![]() | finishIt : Signaler
This signal emit when the notifyFinished method is invoked. | Task | |
| length : uint [read-only]
Returns the number of commands in memory. | Cache | ||
![]() | logger : Logger
Determinates the internal Logger reference of this Loggable object. | Task | |
![]() | phase : String [read-only]
The current phase of the action. | Task | |
![]() | running : Boolean [read-only]
Indicates true if the process is in progress. | Task | |
![]() | startIt : Signaler
This signal emit when the notifyStarted method is invoked. | Task | |
| target : *
The scope of the object. | Cache | ||
| Method | Defined By | ||
|---|---|---|---|
Creates a new Cache instance. | Cache | ||
clear():void
Removes all commands in memory. | Cache | ||
clone():* [override]
Creates and returns a shallow copy of the object. | Cache | ||
enqueueAttribute(name:String, value:*):Cache
Enqueues an attribute name/value entry. | Cache | ||
enqueueMethod(name:String, ... args):Cache
Enqueues a method definition. | Cache | ||
enqueueMethodWithArguments(name:String, args:Array, rest:Array = null):Cache
Enqueues a method definition with an Array of arguments and an optional rest list of parameters.. | Cache | ||
isEmpty():Boolean
Indicates if the tracker cache is empty. | Cache | ||
![]() | isLocked():Boolean
Returns true if the object is locked. | Task | |
![]() | lock():void
Locks the object. | Task | |
![]() | notifyFinished():void
Notify an ActionEvent when the process is finished. | Task | |
![]() | notifyStarted():void
Notify an ActionEvent when the process is started. | Task | |
run(... arguments):void [override]
Flush and invoke all the commands in memory. | Cache | ||
![]() | unlock():void
Unlocks the display. | Task | |
| length | property |
length:uint [read-only] Returns the number of commands in memory.
public function get length():uint| target | property |
public var target:*The scope of the object.
| Cache | () | Constructor |
public function Cache(target:* = null, init:Vector.<Property> = null)Creates a new Cache instance.
Parameterstarget:* (default = null) — The scope of the cache object.
| |
init:Vector.<Property> (default = null) |
| clear | () | method |
public function clear():voidRemoves all commands in memory.
| clone | () | method |
override public function clone():*Creates and returns a shallow copy of the object.
Returns* — A new object that is a shallow copy of this instance.
|
| enqueueAttribute | () | method |
public function enqueueAttribute(name:String, value:*):CacheEnqueues an attribute name/value entry.
Parameters
name:String | |
value:* |
Cache |
| enqueueMethod | () | method |
public function enqueueMethod(name:String, ... args):CacheEnqueues a method definition.
Parameters
name:String — The name of the method.
| |
... args — The optional arguments passed-in the method.
|
Cache |
| enqueueMethodWithArguments | () | method |
public function enqueueMethodWithArguments(name:String, args:Array, rest:Array = null):CacheEnqueues a method definition with an Array of arguments and an optional rest list of parameters..
Parameters
name:String — The name of the method.
| |
args:Array — The Array of all arguments passed-in the method.
| |
rest:Array (default = null) — The optional Array reference of rest arguments passed-in the method (if the method use a ..rest definition).
|
Cache |
| isEmpty | () | method |
public function isEmpty():BooleanIndicates if the tracker cache is empty.
ReturnsBoolean |
| run | () | method |
override public function run(... arguments):voidFlush and invoke all the commands in memory.
Parameters
... arguments |