org.deegree.coverage.raster.cache
Class ByteBufferPool

java.lang.Object
  extended by org.deegree.coverage.raster.cache.ByteBufferPool

public class ByteBufferPool
extends Object

The ByteBufferPool will be the central place for buffering byte buffers used for rasters. Currently only new byte buffers are created, no pooling is done.

Version:
$Revision: 31644 $, $Date: 2011-08-24 22:27:43 +0200 (Wed, 24 Aug 2011) $
Author:
Rutger Bezema, last edited by: $Author: mschneider $

Constructor Summary
ByteBufferPool()
           
 
Method Summary
static ByteBuffer allocate(int size, boolean directAllocation)
           
static ByteBuffer allocate(int size, boolean direct, boolean forCache)
          Frees up raster memory and than allocates the ByteBuffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteBufferPool

public ByteBufferPool()
Method Detail

allocate

public static ByteBuffer allocate(int size,
                                  boolean direct,
                                  boolean forCache)
Frees up raster memory and than allocates the ByteBuffer.

Parameters:
size -
direct -
forCache -
Returns:
an allocated byte buffer of the given size.

allocate

public static ByteBuffer allocate(int size,
                                  boolean directAllocation)
Parameters:
size -
directAllocation - if the allocation should be direct
Returns:
the newly created ByteBuffer.


Copyright © 2011. All Rights Reserved.