Package org.eclipse.birt.chart.render

# Class DeferredCacheManager

java.lang.Object
org.eclipse.birt.chart.render.DeferredCacheManager

public final class DeferredCacheManager extends Object
The class is used to manage runtime DeferredCache of series, it assures the correct painting z-order of series for 2D case.

Since:
  2.2.1

## Constructor Summary

Constructors
Constructor
Description
`DeferredCacheManager(IDeviceRenderer idr, Chart chart)`
Constructor of the class.

## Method Summary

Modifier and Type
Method
Description
`void`
`clearDC()`
Clear all `DeferredCache` instances.
`DeferredCache`
`createDeferredCache(BaseRenderer br, int cacheIndex)`
Create `DeferredCache` instance for current series.
`void`
`flushAll()`
Flush all `DeferredCache` in the manager.
`void`
`flushOptions(int options)`
Flush specified blocks.
`DeferredCache`
`getFirstDeferredCache()`
Returns first `DeferredCache` instance.
`DeferredCache`
`getLastDeferredCache()`
Returns last `DeferredCache` instance.
`void`
`getMarkersNLabels(List<IRenderInstruction> allMarkers, List<TextRenderEvent> allLabels)`
Get markers and labels from all caches.
`void`
`process3DEvent(DeferredCache deferredCache, Engine3D engine, double xOffset, double yOffset)`
Pre-process all the 3D rendering events.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### DeferredCacheManager

public DeferredCacheManager(IDeviceRenderer idr, Chart chart)
Constructor of the class.

Parameters:
  `idr` - specified device renderer.
  `chart` - specified chart instance.

## Method Details

### createDeferredCache

public DeferredCache createDeferredCache(BaseRenderer br, int cacheIndex)
Create `DeferredCache` instance for current series.

Parameters:
  `br` - current renderer.
Returns:
  instance of `DeferredCache`

### flushAll

public void flushAll() throws ChartException
Flush all `DeferredCache` in the manager.

Throws:
  `ChartException`

### flushOptions

public void flushOptions(int options) throws ChartException
Flush specified blocks.

Parameters:
  `options` -
Throws:
  `ChartException`

### getMarkersNLabels

public void getMarkersNLabels(List<IRenderInstruction> allMarkers, List<TextRenderEvent> allLabels)
Get markers and labels from all caches.

Parameters:
  `allMarkers` -
  `allLabels` -

### clearDC

public void clearDC()
Clear all `DeferredCache` instances.

### getFirstDeferredCache

public DeferredCache getFirstDeferredCache()
Returns first `DeferredCache` instance.

Returns:
  first `DeferredCache` instance.

### getLastDeferredCache

public DeferredCache getLastDeferredCache()
Returns last `DeferredCache` instance.

Returns:
  last `DeferredCache` instance.

### process3DEvent

public void process3DEvent(DeferredCache deferredCache, Engine3D engine, double xOffset, double yOffset)
Pre-process all the 3D rendering events. This must be called before `flushAll()`.

Parameters:
  `deferredCache` - specified deferred cache instance.
  `engine` -
  `xOffset` -
  `yOffset` -
Since:
  2.3