1 23 24 package org.objectweb.cjdbc.controller.recoverylog.events; 25 26 import java.sql.SQLException ; 27 28 import org.objectweb.cjdbc.common.i18n.Translate; 29 import org.objectweb.cjdbc.controller.recoverylog.LoggerThread; 30 31 38 public class StoreDumpCheckpointEvent implements LogEvent 39 { 40 private long checkpointId; 41 private String checkpointName; 42 43 49 public StoreDumpCheckpointEvent(String checkpointName, long checkpointId) 50 { 51 this.checkpointId = checkpointId; 52 this.checkpointName = checkpointName; 53 } 54 55 58 public boolean belongToTransaction(long tid) 59 { 60 return false; 61 } 62 63 66 public void execute(LoggerThread loggerThread) 67 { 68 try 69 { 70 loggerThread.storeCheckpoint(checkpointName, checkpointId); 71 } 72 catch (SQLException e) 73 { 74 loggerThread.invalidateLogStatements(); 75 loggerThread.getLogger().error( 76 Translate.get("recovery.jdbc.checkpoint.store.failed", new Object []{ 77 checkpointName, e}), e); 78 loggerThread.putBackAtHeadOfQueue(this); 81 } 82 } 83 } 84 | Popular Tags |