use of org.apache.ignite.internal.processors.query.h2.opt.GridH2KeyValueRowOffheap in project ignite by apache.
the class H2RowDescriptor method createRow.
/** {@inheritDoc} */
@Override
public GridH2Row createRow(KeyCacheObject key, int partId, @Nullable CacheObject val, GridCacheVersion ver, long expirationTime) throws IgniteCheckedException {
GridH2Row row;
try {
if (// Only can happen for remove operation, can create simple search row.
val == null)
row = GridH2RowFactory.create(wrap(key, keyType));
else
row = schema.offheap() == null ? new GridH2KeyValueRowOnheap(this, key, keyType, val, valType, ver, expirationTime) : new GridH2KeyValueRowOffheap(this, key, keyType, val, valType, ver, expirationTime);
} catch (ClassCastException e) {
throw new IgniteCheckedException("Failed to convert key to SQL type. " + "Please make sure that you always store each value type with the same key type " + "or configure key type as common super class for all actual keys for this value type.", e);
}
row.ver = ver;
row.key = key;
row.val = val;
row.partId = partId;
return row;
}
Aggregations