org.knime.core.data.container
Class BlobDataCell
java.lang.Object
org.knime.core.data.DataCell
org.knime.core.data.container.BlobDataCell
- All Implemented Interfaces:
- Serializable, DataValue
public abstract class BlobDataCell
- extends DataCell
Abstract Binary large object cell used to handle
potentially large cells.
Cell implementations extending from this class will be separately written
when a table is buffered on disc (each cell into a separate file).
This has two advantages:
- Cells of this class will be only written once, i.e. any subsequent node
that references this cell object will not buffer a copy of it again
but rather reference to this single cell. (In comparison to ordinary cells
such as
DoubleCell
or
StringCell
,
which get copied when buffered multiple times.)
-
Objects of this class will be read from disc as late as possible, more
precisely, they get read when the
DataRow.getCell(int)
method is invoked. (Usually,
cells get deserialized when the
RowIterator.next()
method is called. This may
save much time when the cell is not used as for instance in a row filter,
row sampler or sorter node.
- Once deserialized, the cell is held in a
SoftReference
, allowing for garbage collection when
memory gets limited (unless cell is otherwise referenced).
In comparison to ordinary cell implementation, objects of this class
take slightly longer to (de)serialize as they get written to a separate
blobs directory.
Implementation note: The content of a DataContainer
is
usually written to a file knime_container_date_xxx.bin.gz
file in the temp directory. BlobDataCell
objects are treated
differently, they are written to a separate directory called
knime_container_date
, each blob cell into a separate
(compressed) file.
- Author:
- Bernd Wiswedel, University of Konstanz
- See Also:
- Serialized Form
Nested Class Summary |
(package private) static class |
BlobDataCell.BlobAddress
Utility class that holds information where the blob is located. |
Field Summary |
static boolean |
USE_COMPRESSION
Shall blob cells be compressed when saved to blob file. |
USE_COMPRESSION
public static final boolean USE_COMPRESSION
- Shall blob cells be compressed when saved to blob file. This
field is
true
, which means the file is
compressed using the gzip compression format.
This field is accessed on the concrete implementation of
BlobDataCell
using reflection. If objects of the derived
class shall not be compressed, define a static field with the same
name/type/scope, which returns false
.
- See Also:
- Constant Field Values
BlobDataCell
public BlobDataCell()
getBlobAddress
BlobDataCell.BlobAddress getBlobAddress()
- Get the location of the blob or
null
if it hasn't been stored just yet.
- Returns:
- This blob's address.
setBlobAddress
void setBlobAddress(BlobDataCell.BlobAddress blobAddress)
- Set Blob address (which can't be
null
).
- Parameters:
blobAddress
- The blob address object.
Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display,
or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the
copyright owner or as specified in the license file distributed with this product.