if (log.isTraceEnabled()) {
log.trace("Running saveBucket. Sql: '" + sql + "', on bucket: " + bucket);
}
conn = connectionFactory.getConnection();
ps = conn.prepareStatement(sql);
ByteBuffer buffer = JdbcUtil.marshall(getMarshaller(), bucket);
ps.setBinaryStream(1, buffer.getStream(), buffer.getLength());
ps.setLong(2, bucket.timestampOfFirstEntryToExpire());
ps.setString(3, bucket.getBucketName());
int updatedRows = ps.executeUpdate();
if (updatedRows != 1) {
throw new CacheLoaderException("Unexpected update result: '" + updatedRows + "'. Expected values is 1");