1 /** 2 * Sequoia: Database clustering technology. 3 * Copyright (C) 2005 Emic Networks. 4 * Contact: sequoia@continuent.org 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 * 18 * Initial developer(s): Emmanuel Cecchet. 19 * Contributor(s): ______________________. 20 */ 21 22 package org.continuent.sequoia.controller.recoverylog.events; 23 24 import org.continuent.sequoia.controller.recoverylog.LoggerThread; 25 26 /** 27 * This interface defines a LogEvent that defines the profile of actions that 28 * manipulate the recovery log like logging a request. 29 * 30 * @author <a HREF="mailto:emmanuel.cecchet@emicnetworks.com">Emmanuel Cecchet</a> 31 * @version 1.0 32 */ 33 public interface LogEvent 34 { 35 /** 36 * Returns true if this logEvent belongs to the given transaction. 37 * 38 * @param tid the transaction identifier 39 * @return true if this logEvent belongs to this transaction 40 */ 41 boolean belongToTransaction(long tid); 42 43 /** 44 * Called by the LoggerThread to perform the needed operation on the log for 45 * this entry. 46 * 47 * @param loggerThread the logger thread calling this method 48 */ 49 void execute(LoggerThread loggerThread); 50 51 } 52