Paket | spark.core |
Klass | public class ContentCache |
Arv | ContentCache EventDispatcher Object |
Implementerar | IContentLoader |
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4.5 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Egenskap | Definieras med | ||
---|---|---|---|
constructor : Object
En referens till klassobjektet eller konstruktorfunktionen för en given objektinstans. | Object | ||
enableCaching : Boolean
Enables caching behavior and functionality. | ContentCache | ||
enableQueueing : Boolean
Enables queuing behavior and functionality. | ContentCache | ||
maxActiveRequests : int
Maximum simultaneous active requests when queuing is
enabled. | ContentCache | ||
maxCacheEntries : int
Maximum size of MRU based cache. | ContentCache | ||
numCacheEntries : int [skrivskyddad]
Count of active/in-use cache entries. | ContentCache |
Egenskap | Definieras med | ||
---|---|---|---|
activeRequests : LinkedList
List of queued CacheEntryNode instances currently executing. | ContentCache | ||
cachedData : Dictionary
Map of source to CacheEntryNode. | ContentCache | ||
cacheEntries : LinkedList
Ordered (MRU) list of CacheEntryNode instances. | ContentCache | ||
priorityGroup : String = "_DEFAULT_"
Identifier of the currently prioritized content grouping. | ContentCache | ||
requestQueue : LinkedList
List of queued CacheEntryNode instances. | ContentCache |
Metod | Definieras med | ||
---|---|---|---|
Constructor. | ContentCache | ||
Adds new entry to cache (or replaces existing entry). | ContentCache | ||
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registrerar ett händelseavlyssnarobjekt för ett EventDispatcher-objekt så att avlyssnaren får meddelanden om händelser. | EventDispatcher | ||
Skickar en händelse till händelseflödet. | EventDispatcher | ||
Obtain an entry for the given key if one exists. | ContentCache | ||
Kontrollerar om EventDispatcher-objektet har några avlyssnare registrerade för en viss typ av händelse. | EventDispatcher | ||
Anger om det finns en egenskap angiven för ett objekt. | Object | ||
Anger om en instans av klassen Object finns i prototypkedjan för objektet som anges som parameter. | Object | ||
Initiates a content request for the resource identified
by the key specified. | ContentCache | ||
Promotes a content grouping to the head of the loading queue. | ContentCache | ||
Anger om den angivna egenskapen finns och är uppräkningsbar. | Object | ||
Resets our cache content to initial empty state. | ContentCache | ||
Resets the queue to initial empty state. | ContentCache | ||
Remove specific entry from cache. | ContentCache | ||
Tar bort en avlyssnare från EventDispatcher-objektet. | EventDispatcher | ||
Anger tillgänglighet för en dynamisk egenskap för slingåtgärder. | Object | ||
Returnerar det här objektets strängrepresentation, formaterad i enlighet med språkspecifika konventioner. | Object | ||
Returnerar det angivna objektets strängbeteckning. | Object | ||
Returnerar det angivna objektets primitiva värde. | Object | ||
Kontrollerar om en händelseavlyssnare är registrerad för det här EventDispatcher-objektet eller något av dess överordnade objekt för den angivna händelsetypen. | EventDispatcher |
Händelse | Sammanfattning | Definieras med | ||
---|---|---|---|---|
[utsändningshändelse] Skickas när Flash Player eller AIR får operativsystemfokus och blir aktivt. | EventDispatcher | |||
[utsändningshändelse] Skickas när Flash Player eller AIR förlorar operativsystemfokus och blir inaktivt. | EventDispatcher | |||
Dispatched when a cache entry is invalidated, generally this occurs when the entry is determined to be untrusted while one or more outstanding load requests are active for a given cache entry. | ContentCache |
Konstant | Definieras med | ||
---|---|---|---|
UNTRUSTED : String = "untrusted" [statisk]
Value used to mark cached URLs that are detected as being from an
untrusted source (meaning they will no longer be shareable). | ContentCache |
activeRequests | egenskap |
protected var activeRequests:LinkedList
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4.5 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
List of queued CacheEntryNode instances currently executing.
cachedData | egenskap |
protected var cachedData:Dictionary
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4.5 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Map of source to CacheEntryNode.
cacheEntries | egenskap |
protected var cacheEntries:LinkedList
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4.5 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Ordered (MRU) list of CacheEntryNode instances.
enableCaching | egenskap |
enableCaching:Boolean
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4.5 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Enables caching behavior and functionality. Applies only to new load() requests.
Standardvärdet är true.
Implementering
public function get enableCaching():Boolean
public function set enableCaching(value:Boolean):void
enableQueueing | egenskap |
enableQueueing:Boolean
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4.5 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Enables queuing behavior and functionality. Applies only to new load() requests.
Standardvärdet är false.
Implementering
public function get enableQueueing():Boolean
public function set enableQueueing(value:Boolean):void
maxActiveRequests | egenskap |
maxActiveRequests:int
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4.5 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Maximum simultaneous active requests when queuing is enabled.
Standardvärdet är 2.
Implementering
public function get maxActiveRequests():int
public function set maxActiveRequests(value:int):void
maxCacheEntries | egenskap |
maxCacheEntries:int
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4.5 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Maximum size of MRU based cache. When numCacheEntries exceeds maxCacheEntries the least recently used are pruned to fit.
Standardvärdet är 100.
Implementering
public function get maxCacheEntries():int
public function set maxCacheEntries(value:int):void
numCacheEntries | egenskap |
priorityGroup | egenskap |
protected var priorityGroup:String = "_DEFAULT_"
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4.5 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Identifier of the currently prioritized content grouping.
Standardvärdet är "_DEFAULT_".
requestQueue | egenskap |
protected var requestQueue:LinkedList
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4.5 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
List of queued CacheEntryNode instances.
ContentCache | () | Konstruktor |
public function ContentCache()
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4.5 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Constructor.
addCacheEntry | () | metod |
public function addCacheEntry(source:Object, value:Object):void
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4.5 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Adds new entry to cache (or replaces existing entry).
Parametrar
source:Object — Unique key to associate provided value with in cache.
| |
value:Object — Value to cache for given key.
|
getCacheEntry | () | metod |
public function getCacheEntry(source:Object):Object
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4.5 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Obtain an entry for the given key if one exists.
Parametrar
source:Object — Unique key used to represent the requested content resource.
|
Object — A value being stored by the cache for the provided key. Returns
null if not found or in the likely case the value was stored as null.
|
load | () | metod |
public function load(source:Object, contentLoaderGrouping:String = null):ContentRequest
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4.5 |
Körningsmiljöversioner: | Flash Player 10, AIR 2.5 |
Initiates a content request for the resource identified by the key specified.
Parametrar
source:Object — Unique key used to represent the requested content resource.
This parameter is typically an URL or URLRequest.
| |
contentLoaderGrouping:String (default = null ) — - (Optional) grouping identifier for the loaded resource.
ContentLoader instances supporting content groups generally allow for
resources within the same named grouping to be addressed as a whole. For
example the ContentCache's loader queue allows requests to be prioritized
by contentLoaderGrouping.
|
ContentRequest — A ContentRequest instance representing the requested resource.
|
prioritize | () | metod |
public function prioritize(contentLoaderGrouping:String):void
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4.5 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Promotes a content grouping to the head of the loading queue.
Parametrar
contentLoaderGrouping:String — Name of content grouping to promote
in the loading queue. All queued requests with matching
contentLoaderGroup will be shifted to the head of the queue.
|
removeAllCacheEntries | () | metod |
public function removeAllCacheEntries():void
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4.5 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Resets our cache content to initial empty state.
removeAllQueueEntries | () | metod |
public function removeAllQueueEntries():void
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4.5 |
Körningsmiljöversioner: | Flash Player 10, AIR 1.5 |
Resets the queue to initial empty state. All requests, both active and queued, are cancelled. All cache entries associated with canceled requests are invalidated.
removeCacheEntry | () | metod |
invalidateLoader | Händelse |
spark.events.LoaderInvalidationEvent
egenskap LoaderInvalidationEvent.type =
spark.events.LoaderInvalidationEvent
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4.5 |
Körningsmiljöversioner: | Flash Player 10, AIR 2.0 |
Dispatched when a cache entry is invalidated, generally this occurs when the entry is determined to be untrusted while one or more outstanding load requests are active for a given cache entry. This mechanism allows any outstanding content requests to be reset due to the fact that the cache entry has been deemed 'unshareable'. Each content request notified then attempts instead re-requests the asset.
UNTRUSTED | Konstant |
protected static const UNTRUSTED:String = "untrusted"
Språkversion: | ActionScript 3.0 |
Produktversion: | Flex 4.5 |
Körningsmiljöversioner: | Flash Player 9, AIR 1.1 |
Value used to mark cached URLs that are detected as being from an untrusted source (meaning they will no longer be shareable).
Tue Jun 12 2018, 01:40 PM Z