| Pakiet | spark.core |
| Klasa | public class ContentCache |
| Dziedziczenie | ContentCache EventDispatcher Object |
| Implementuje | IContentLoader |
| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flex 4.5 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
| Właściwość | Zdefiniowane przez | ||
|---|---|---|---|
![]() | constructor : Object
Odwołanie do obiektu klasy lub funkcji konstruktora, dotyczące danej instancji obiektu. | 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 [tylko do odczytu]
Count of active/in-use cache entries. | ContentCache | ||
| Właściwość | Zdefiniowane przez | ||
|---|---|---|---|
| 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 | ||
| Metoda | Zdefiniowane przez | ||
|---|---|---|---|
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
Rejestruje obiekt detektora zdarzeń w obiekcie EventDispatcher, dzięki czemu detektor będzie otrzymywał powiadomienia o zdarzeniu. | EventDispatcher | |
![]() |
Wywołuje zdarzenie, tj. kieruje je do przepływu zdarzeń. | EventDispatcher | |
Obtain an entry for the given key if one exists. | ContentCache | ||
![]() |
Sprawdza, czy obiekt EventDispatcher zawiera jakiekolwiek detektory zarejestrowane dla konkretnego typu zdarzeń. | EventDispatcher | |
![]() |
Wskazuje, czy dla obiektu zdefiniowano określoną właściwość. | Object | |
![]() |
Wskazuje, czy instancja klasy Object należy do łańcucha prototypów obiektu określonego jako parametr. | 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 | ||
![]() |
Wskazuje, czy określona właściwość istnieje i jest przeliczalna. | Object | |
Resets our cache content to initial empty state. | ContentCache | ||
Resets the queue to initial empty state. | ContentCache | ||
Remove specific entry from cache. | ContentCache | ||
![]() |
Usuwa detektor z obiektu EventDispatcher. | EventDispatcher | |
![]() |
Ustawia dostępność właściwości dynamicznej używanej w pętlach. | Object | |
![]() |
Zwraca ciąg reprezentujący obiekt — sformatowany zgodnie z konwencjami właściwymi dla ustawień regionalnych. | Object | |
![]() |
Zwraca ciąg reprezentujący określony obiekt. | Object | |
![]() |
Zwraca pierwotną wartość dla określonego obiektu. | Object | |
![]() |
Sprawdza, czy detektor zdarzeń określonego typu jest zarejestrowany w tym obiekcie EventDispatcher lub jego elementach macierzystych. | EventDispatcher | |
| Zdarzenie | Podsumowanie | Zdefiniowane przez | ||
|---|---|---|---|---|
![]() | [zdarzenie broadcast] Wywoływane, gdy program Flash Player lub aplikacja środowiska wykonawczego AIR uzyskuje fokus w systemie operacyjnym i przechodzi w stan aktywny. | EventDispatcher | ||
![]() | [zdarzenie broadcast] Wywoływane, gdy program Flash Player lub aplikacja AIR traci fokus w systemie operacyjnym i przechodzi w stan nieaktywny. | 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 | |||
| Stała | Zdefiniowane przez | ||
|---|---|---|---|
| UNTRUSTED : String = "untrusted" [statyczny]
Value used to mark cached URLs that are detected as being from an
untrusted source (meaning they will no longer be shareable). | ContentCache | ||
activeRequests | właściwość |
protected var activeRequests:LinkedList| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flex 4.5 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
List of queued CacheEntryNode instances currently executing.
cachedData | właściwość |
protected var cachedData:Dictionary| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flex 4.5 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Map of source to CacheEntryNode.
cacheEntries | właściwość |
protected var cacheEntries:LinkedList| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flex 4.5 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Ordered (MRU) list of CacheEntryNode instances.
enableCaching | właściwość |
enableCaching:Boolean| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flex 4.5 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Enables caching behavior and functionality. Applies only to new load() requests.
Wartością domyślną jest true.
Implementacja
public function get enableCaching():Boolean public function set enableCaching(value:Boolean):voidenableQueueing | właściwość |
enableQueueing:Boolean| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flex 4.5 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Enables queuing behavior and functionality. Applies only to new load() requests.
Wartością domyślną jest false.
Implementacja
public function get enableQueueing():Boolean public function set enableQueueing(value:Boolean):voidmaxActiveRequests | właściwość |
maxActiveRequests:int| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flex 4.5 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Maximum simultaneous active requests when queuing is enabled.
Wartością domyślną jest 2.
Implementacja
public function get maxActiveRequests():int public function set maxActiveRequests(value:int):voidmaxCacheEntries | właściwość |
maxCacheEntries:int| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flex 4.5 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Maximum size of MRU based cache. When numCacheEntries exceeds maxCacheEntries the least recently used are pruned to fit.
Wartością domyślną jest 100.
Implementacja
public function get maxCacheEntries():int public function set maxCacheEntries(value:int):voidnumCacheEntries | właściwość |
priorityGroup | właściwość |
protected var priorityGroup:String = "_DEFAULT_"| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flex 4.5 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Identifier of the currently prioritized content grouping.
Wartością domyślną jest "_DEFAULT_".
requestQueue | właściwość |
protected var requestQueue:LinkedList| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flex 4.5 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
List of queued CacheEntryNode instances.
ContentCache | () | Konstruktor |
public function ContentCache()| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flex 4.5 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Constructor.
addCacheEntry | () | metoda |
public function addCacheEntry(source:Object, value:Object):void| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flex 4.5 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Adds new entry to cache (or replaces existing entry).
Parametry
source:Object — Unique key to associate provided value with in cache.
| |
value:Object — Value to cache for given key.
|
getCacheEntry | () | metoda |
public function getCacheEntry(source:Object):Object| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flex 4.5 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Obtain an entry for the given key if one exists.
Parametry
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 | () | metoda |
public function load(source:Object, contentLoaderGrouping:String = null):ContentRequest| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flex 4.5 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 2.5 |
Initiates a content request for the resource identified by the key specified.
Parametry
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 | () | metoda |
public function prioritize(contentLoaderGrouping:String):void| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flex 4.5 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Promotes a content grouping to the head of the loading queue.
Parametry
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 | () | metoda |
public function removeAllCacheEntries():void| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flex 4.5 |
| Wersje środowiska wykonawczego: | Flash Player 10, AIR 1.5 |
Resets our cache content to initial empty state.
removeAllQueueEntries | () | metoda |
public function removeAllQueueEntries():void| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flex 4.5 |
| Wersje środowiska wykonawczego: | 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 | () | metoda |
invalidateLoader | Zdarzenie |
spark.events.LoaderInvalidationEventwłaściwość LoaderInvalidationEvent.type =
spark.events.LoaderInvalidationEvent| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flex 4.5 |
| Wersje środowiska wykonawczego: | 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 | Stała |
protected static const UNTRUSTED:String = "untrusted"| Wersja języka: | ActionScript 3.0 |
| Wersja produktu: | Flex 4.5 |
| Wersje środowiska wykonawczego: | 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, 12:06 PM Z
Ukryj dziedziczone właściwości publiczne
Pokaż dziedziczone właściwości publiczne