Lade...
 

CX_OBJECT_MANAGER::SetGlobalFetchPolicy

CX_OBJECT_MANAGER::SetGlobalFetchPolicy

Beschreibung:

Diese Klassenfunktion stellt die globale Fetch-Strategie so ein, dass mindestens n Bytes am Stück aus der Datenbank geladen werden, oder der komplette Cluster (n=0).

Zu beachten ist, dass immer nur ganze Pages geladen werden können. Die Anzahl an Bytes wird somit auf ein Vielfaches der Page-Größe aufgerundet. (Siehe GetPageSize)

Ist die angegebene Zahl negativ, so wird eine spezielle Buffering-Strategie angewendet, bei der stets nur zwei Einheiten (zu je n Bytes) an Daten im Speicher enthalten sind.

Bei Anwendung dieser Buffering-Strategie mit negativen Page-Größen ist zu beachten, dass die bisher geladenen Einheiten an Daten aus dem Cache verdrängt werden!

Auszug aus der ObjectStore-Dokumentation:

For special operations that scan sequentially through very large data structures,  os_fetch_stream might improve performance considerably. As with  os_fetch_page , this fetch policy lets you specify the amount of data to fetch in each client/server interaction for a particular cluster. In addition, it specifies that a double buffering policy should be used to stream data from the cluster.
This means that after the first two transfers from the cluster, each transfer from the cluster replaces the data cached by the second-to-last transfer from that cluster. This way, the last two chunks of data retrieved from the cluster generally will be in the client cache at the same time. And after the first two transfers, transfers from the cluster generally will not result in eviction of data from other clusters. This policy also greatly reduces the internal overhead of finding pages to evict.
When you perform allocation that extends a cluster whose fetch policy is  os_fetch_stream , the double buffering described previously begins when allocation reaches an offset in the cluster that is aligned with the fetch quantum (that is, when the modulus of the offset and the fetch quantum is  0 ).
If the fetch quantum exceeds the amount of available cache space (cache size minus wired pages), transfers are performed a page at a time. In general, the fetch quantum should be less than half the size of the client cache.

Code-Beispiel:
0 GetManager(OBJECT) Call(SetGlobalFetchPolicy)      // Immer kompletten Cluster holen
16384 GetManager(OBJECT) Call(SetGlobalFetchPolicy)  // Immer 4 Pages auf einmal holen

 

Stack
Stack Position Objekttyp Kurzbeschreibung
Stack(In) Top CX_OBJECT_MANAGER Objekt-Manager
  Top-1 INTEGER Lade n Bytes am Stück; 0 für den kompletten Cluster
Stack(Out) Top    
Funktionsaufruf: Call(SetGlobalFetchPolicy)