public void setMark(RecordLocation recordLocator, boolean force)
throws InvalidRecordLocationException, IOException {
try {
if (recordLocator == null
|| recordLocator.getClass() != LongRecordLocation.class)
throw new InvalidRecordLocationException();
long location = ((LongRecordLocation) recordLocator)
.getLongLocation();
logger.mark(location, force);
lastMark = recordLocator;
} catch (InterruptedException e) {
throw (InterruptedIOException) new InterruptedIOException()
.initCause(e);
} catch (IOException e) {
throw e;
} catch (InvalidLogKeyException e) {
throw new InvalidRecordLocationException(e.getMessage(), e);
} catch (Exception e) {
throw (IOException) new IOException("Journal write failed: " + e)
.initCause(e);
}
}