/** * Collects information about the tail of the transaction log, i.e. last checkpoint, last entry etc. * Since this is an expensive task we do it once and reuse the result. This method is thus lazy and the first one * calling it will take the hit. * <p> * This is only intended to be used during startup. If you need to track the state of the tail, that can be done more * efficiently at runtime, and this method should then only be used to restore said state. * * @return snapshot of the state of the transaction logs tail at startup. * @throws UnderlyingStorageException if any errors occurs while parsing the transaction logs */ public LogTailInformation getTailInformation() throws UnderlyingStorageException { if ( logTailInformation == null ) { try { logTailInformation = findLogTail(); } catch ( IOException e ) { throw new UnderlyingStorageException( "Error encountered while parsing transaction logs", e ); } } return logTailInformation; }
/** * Collects information about the tail of the transaction log, i.e. last checkpoint, last entry etc. * Since this is an expensive task we do it once and reuse the result. This method is thus lazy and the first one * calling it will take the hit. * <p> * This is only intended to be used during startup. If you need to track the state of the tail, that can be done more * efficiently at runtime, and this method should then only be used to restore said state. * * @return snapshot of the state of the transaction logs tail at startup. * @throws UnderlyingStorageException if any errors occurs while parsing the transaction logs */ public LogTailInformation getTailInformation() throws UnderlyingStorageException { if ( logTailInformation == null ) { try { logTailInformation = findLogTail(); } catch ( IOException e ) { throw new UnderlyingStorageException( "Error encountered while parsing transaction logs", e ); } } return logTailInformation; }