omerojava.util
Class PixelsCache

java.lang.Object
  extended by omerojava.util.PixelsCache

public class PixelsCache
extends Object

Caches Plane2D data, within a given pixels set, that have been rendered.

The number of entries in the cache at any given time is maxEntries at most, being maxEntries the greatest integer such that maxEntries*planeSize <= cacheSize .

If maxEntries is reached and an entry has to be added, we discard a previous entry to make room for the new one.

Since:
OME3.0
Version:
3.0 (Internal version: $Revision: $Date: $)
Author:
Jean-Marie Burel      j.burel@dundee.ac.uk, Donald MacDonald      donald@lifesci.dundee.ac.uk

Constructor Summary
PixelsCache(int cacheSize, int planeSize)
          Creates a new instance.
 
Method Summary
 void resetCacheSize(int size)
          Resets the size of the cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PixelsCache

public PixelsCache(int cacheSize,
                   int planeSize)
Creates a new instance.

Parameters:
cacheSize - The size, in bytes, of the cache. Must be positive.
planeSize - The size, in bytes, of an image. Must be positive.
Method Detail

resetCacheSize

public void resetCacheSize(int size)
Resets the size of the cache.

Parameters:
size -


OmeroJava Api

Version: 4.3.3-00d1137e-b2894

Copyright © 2009 The University of Dundee. All Rights Reserved.