Mercurial > hg > blitz_condensed
view src/org/dancres/blitz/txn/UnsyncdOps.java @ 33:0b9265358617
Added tag 2.1.1 for changeset a77f0a9ed93c
author | Dan Creswell <dan.creswell@gmail.com> |
---|---|
date | Sat, 12 Jun 2010 10:52:10 +0100 |
parents | 3dc0c5604566 |
children |
line wrap: on
line source
package org.dancres.blitz.txn; import org.dancres.blitz.BootInfo; /** <p>UnsyncdOps provides boot-time information concerning the maximum number of log operations which might have occurred since the last full checkpoint/sync was initiated.</p> <p>We deliberately return double the op count to allow for interrupted checkpoints. An interrupted checkpoint leads to two contiguous log files with no separating checkpoint image. The maximum number of operations before the next checkpoint would, therefore be double the maximum number of ops per checkpoint. A checkpoint can only be interrupted as the result of violent shutdown and, restart will immediately resolve state using the UnsyncdOps. If restart fails to complete, there will be no further log entries or checkpoints and the next restart will, worst case, apply the state resolution twice which isn't harmful.</p> */ public class UnsyncdOps implements BootInfo, java.io.Serializable { private int theOpCount; UnsyncdOps(int anOpCount) { theOpCount = 2 * anOpCount; } public int getOpsSinceLastCheckpoint() { return theOpCount; } }