* false if no log records were shipped because log buffer is empty.
*/
private synchronized boolean shipALogChunk()
throws IOException, StandardException {
byte [] logRecords = null;
ReplicationMessage mesg = null;
try {
//Check to see if a previous log record exists that needs
//to be re-transmitted. If there is then transmit that
//log record and then transmit the next log record in the
//log buffer.
if (failedChunk != null) {
transmitter.sendMessage(failedChunk);
highestShippedInstant = failedChunkHighestInstant;
failedChunk = null;
}
//transmit the log record that is at the head of
//the log buffer.
if (logBuffer.next()) {
logRecords = logBuffer.getData();
mesg = new ReplicationMessage(
ReplicationMessage.TYPE_LOG, logRecords);
transmitter.sendMessage(mesg);
highestShippedInstant = logBuffer.getLastInstant();
lastShippingTime = System.currentTimeMillis();