Naslaggids voor Adobe ActionScript® 3.0 voor het Adobe® Flash®-platform
Startpagina  |  Lijst met pakketten en klassen verbergen |  Pakketten  |  Klassen  |  Nieuw  |  Index  |  Bijlagen  |  Waarom in het Engels?
Filters: Gegevens ophalen van server...
Gegevens ophalen van server...
spark.core 

ContentCache  - AS3 Flex

Pakketspark.core
Klassepublic class ContentCache
OverervingContentCache Inheritance EventDispatcher Inheritance Object
Implementatie IContentLoader

Taalversie: ActionScript 3.0
Productversie: Flex 4.5
Runtimeversies: Flash Player 10, AIR 1.5

Provides a caching and queuing image content loader suitable for using a shared image cache for the BitmapImage and spark Image components.



Openbare eigenschappen
 EigenschapGedefinieerd door
 Inheritedconstructor : Object
Verwijzing naar het klasseobject of de constructorfunctie van een bepaalde objectinstantie.
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
[alleen-lezen] Count of active/in-use cache entries.
ContentCache
Beschermde eigenschappen
 EigenschapGedefinieerd door
  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
Openbare methoden
 MethodeGedefinieerd door
  
Constructor.
ContentCache
  
Adds new entry to cache (or replaces existing entry).
ContentCache
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registreert een gebeurtenislistenerobject bij een object EventDispatcher, zodat de listener een melding van een gebeurtenis ontvangt.
EventDispatcher
 Inherited
Verzendt een gebeurtenis naar de gebeurtenisstroom.
EventDispatcher
  
Obtain an entry for the given key if one exists.
ContentCache
 Inherited
Controleert of het object EventDispatcher listeners heeft geregistreerd voor een specifiek type gebeurtenis.
EventDispatcher
 Inherited
Geeft aan of voor een object een opgegeven eigenschap is gedefinieerd.
Object
 Inherited
Geeft aan of een instantie van de klasse Object zich in de prototypeketen van het object bevindt dat als parameter is opgegeven.
Object
  
load(source:Object, contentLoaderGrouping:String = null):ContentRequest
Initiates a content request for the resource identified by the key specified.
ContentCache
  
prioritize(contentLoaderGrouping:String):void
Promotes a content grouping to the head of the loading queue.
ContentCache
 Inherited
Geeft aan of de opgegeven eigenschap bestaat en kan worden opgesomd.
Object
  
Resets our cache content to initial empty state.
ContentCache
  
Resets the queue to initial empty state.
ContentCache
  
Remove specific entry from cache.
ContentCache
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Verwijdert een listener uit het object EventDispatcher.
EventDispatcher
 Inherited
Stelt de beschikbaarheid van een dynamische eigenschap voor lusbewerkingen in.
Object
 Inherited
Geeft de tekenreeksweergave van dit object weer, geformatteerd volgens de locatiespecifieke conventies.
Object
 Inherited
Retourneert een tekenreeksrepresentatie van het opgegeven object.
Object
 Inherited
Retourneert de primitieve waarde van het opgegeven object.
Object
 Inherited
Controleert of een gebeurtenislistener is geregistreerd bij dit object EventDispatcher of een van de voorouders voor het opgegeven type gebeurtenis.
EventDispatcher
Gebeurtenissen
 Gebeurtenis Overzicht Gedefinieerd door
 Inherited[uitgezonden gebeurtenis] Wordt verzonden wanneer Flash Player of de AIR-toepassing de besturingssysteemfocus krijgt en actief wordt.EventDispatcher
 Inherited[uitgezonden gebeurtenis] Wordt verzonden wanneer Flash Player of de AIR-toepassing de systeemfocus verliest en inactief wordt.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
Beschermde constanten
 ConstanteGedefinieerd door
  UNTRUSTED : String = "untrusted"
[statisch] Value used to mark cached URLs that are detected as being from an untrusted source (meaning they will no longer be shareable).
ContentCache
Eigenschapdetails

activeRequests

eigenschap
protected var activeRequests:LinkedList

Taalversie: ActionScript 3.0
Productversie: Flex 4.5
Runtimeversies: Flash Player 10, AIR 1.5

List of queued CacheEntryNode instances currently executing.

cachedData

eigenschap 
protected var cachedData:Dictionary

Taalversie: ActionScript 3.0
Productversie: Flex 4.5
Runtimeversies: Flash Player 10, AIR 1.5

Map of source to CacheEntryNode.

cacheEntries

eigenschap 
protected var cacheEntries:LinkedList

Taalversie: ActionScript 3.0
Productversie: Flex 4.5
Runtimeversies: Flash Player 10, AIR 1.5

Ordered (MRU) list of CacheEntryNode instances.

enableCaching

eigenschap 
enableCaching:Boolean

Taalversie: ActionScript 3.0
Productversie: Flex 4.5
Runtimeversies: Flash Player 10, AIR 1.5

Enables caching behavior and functionality. Applies only to new load() requests.

De standaardwaarde is true.



Implementatie
    public function get enableCaching():Boolean
    public function set enableCaching(value:Boolean):void

enableQueueing

eigenschap 
enableQueueing:Boolean

Taalversie: ActionScript 3.0
Productversie: Flex 4.5
Runtimeversies: Flash Player 10, AIR 1.5

Enables queuing behavior and functionality. Applies only to new load() requests.

De standaardwaarde is false.



Implementatie
    public function get enableQueueing():Boolean
    public function set enableQueueing(value:Boolean):void

maxActiveRequests

eigenschap 
maxActiveRequests:int

Taalversie: ActionScript 3.0
Productversie: Flex 4.5
Runtimeversies: Flash Player 10, AIR 1.5

Maximum simultaneous active requests when queuing is enabled.

De standaardwaarde is 2.



Implementatie
    public function get maxActiveRequests():int
    public function set maxActiveRequests(value:int):void

maxCacheEntries

eigenschap 
maxCacheEntries:int

Taalversie: ActionScript 3.0
Productversie: Flex 4.5
Runtimeversies: Flash Player 10, AIR 1.5

Maximum size of MRU based cache. When numCacheEntries exceeds maxCacheEntries the least recently used are pruned to fit.

De standaardwaarde is 100.



Implementatie
    public function get maxCacheEntries():int
    public function set maxCacheEntries(value:int):void

numCacheEntries

eigenschap 
numCacheEntries:int  [alleen-lezen]

Taalversie: ActionScript 3.0
Productversie: Flex 4.5
Runtimeversies: Flash Player 10, AIR 1.5

Count of active/in-use cache entries.



Implementatie
    public function get numCacheEntries():int

priorityGroup

eigenschap 
protected var priorityGroup:String = "_DEFAULT_"

Taalversie: ActionScript 3.0
Productversie: Flex 4.5
Runtimeversies: Flash Player 10, AIR 1.5

Identifier of the currently prioritized content grouping.

De standaardwaarde is "_DEFAULT_".

requestQueue

eigenschap 
protected var requestQueue:LinkedList

Taalversie: ActionScript 3.0
Productversie: Flex 4.5
Runtimeversies: Flash Player 10, AIR 1.5

List of queued CacheEntryNode instances.

Constructordetails

ContentCache

()Constructor
public function ContentCache()

Taalversie: ActionScript 3.0
Productversie: Flex 4.5
Runtimeversies: Flash Player 10, AIR 1.5

Constructor.

Methodedetails

addCacheEntry

()methode
public function addCacheEntry(source:Object, value:Object):void

Taalversie: ActionScript 3.0
Productversie: Flex 4.5
Runtimeversies: Flash Player 10, AIR 1.5

Adds new entry to cache (or replaces existing entry).

Parameters

source:Object — Unique key to associate provided value with in cache.
 
value:Object — Value to cache for given key.

getCacheEntry

()methode 
public function getCacheEntry(source:Object):Object

Taalversie: ActionScript 3.0
Productversie: Flex 4.5
Runtimeversies: Flash Player 10, AIR 1.5

Obtain an entry for the given key if one exists.

Parameters

source:Object — Unique key used to represent the requested content resource.

Geretourneerde waarde
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

()methode 
public function load(source:Object, contentLoaderGrouping:String = null):ContentRequest

Taalversie: ActionScript 3.0
Productversie: Flex 4.5
Runtimeversies: Flash Player 10, AIR 2.5

Initiates a content request for the resource identified by the key specified.

Parameters

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.

Geretourneerde waarde
ContentRequest — A ContentRequest instance representing the requested resource.

prioritize

()methode 
public function prioritize(contentLoaderGrouping:String):void

Taalversie: ActionScript 3.0
Productversie: Flex 4.5
Runtimeversies: Flash Player 10, AIR 1.5

Promotes a content grouping to the head of the loading queue.

Parameters

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

()methode 
public function removeAllCacheEntries():void

Taalversie: ActionScript 3.0
Productversie: Flex 4.5
Runtimeversies: Flash Player 10, AIR 1.5

Resets our cache content to initial empty state.

removeAllQueueEntries

()methode 
public function removeAllQueueEntries():void

Taalversie: ActionScript 3.0
Productversie: Flex 4.5
Runtimeversies: 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

()methode 
public function removeCacheEntry(source:Object):void

Taalversie: ActionScript 3.0
Productversie: Flex 4.5
Runtimeversies: Flash Player 10, AIR 1.5

Remove specific entry from cache.

Parameters

source:Object — Unique key for value to remove from cache.

Gebeurtenisdetails

invalidateLoader

Gebeurtenis
Type gebeurtenisobject: spark.events.LoaderInvalidationEvent
eigenschap LoaderInvalidationEvent.type = spark.events.LoaderInvalidationEvent

Taalversie: ActionScript 3.0
Productversie: Flex 4.5
Runtimeversies: 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.

Constantedetails

UNTRUSTED

Constante
protected static const UNTRUSTED:String = "untrusted"

Taalversie: ActionScript 3.0
Productversie: Flex 4.5
Runtimeversies: 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).





[ X ]Waarom in het Engels?
Sommige inhoud van de Naslaggids voor ActionScript 3.0 staat in het Engels

Niet alle onderdelen van de Naslaggids voor ActionScript 3.0 zijn in alle talen vertaald. Wanneer een taalelement niet is vertaald, wordt het in het Engels weergegeven. Zo is de klasse ga.controls.HelpBox niet in elke taal vertaald. In de Nederlandse versie van de naslaggids wordt de klasse ga.controls.HelpBox bijvoorbeeld in het Engels weergegeven.