while (!bucketName.equals(BINARY_STREAM_DELIMITER)) {
Bucket bucket = (Bucket) objectInput.readObject();
readBuckets++;
ByteBuffer buffer = JdbcUtil.marshall(getMarshaller(), bucket);
ps.setBinaryStream(1, buffer.getStream(), buffer.getLength());
ps.setLong(2, bucket.timestampOfFirstEntryToExpire());
ps.setString(3, bucketName);
if (readBuckets % batchSize == 0) {
ps.executeBatch();
if (log.isTraceEnabled())
log.trace("Executing batch " + (readBuckets / batchSize) + ", batch size is " + batchSize);