01: /**
02: * Sequoia: Database clustering technology.
03: * Copyright (C) 2005 Emic Networks.
04: * Contact: sequoia@continuent.org
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License");
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
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: */package org.continuent.sequoia.controller.recoverylog.events;
21:
22: import org.continuent.sequoia.controller.recoverylog.LoggerThread;
23:
24: /**
25: * This interface defines a LogEvent that defines the profile of actions that
26: * manipulate the recovery log like logging a request.
27: *
28: * @author <a href="mailto:emmanuel.cecchet@emicnetworks.com">Emmanuel Cecchet</a>
29: * @version 1.0
30: */
31: public interface LogEvent {
32: /**
33: * Returns true if this logEvent belongs to the given transaction.
34: *
35: * @param tid the transaction identifier
36: * @return true if this logEvent belongs to this transaction
37: */
38: boolean belongToTransaction(long tid);
39:
40: /**
41: * Called by the LoggerThread to perform the needed operation on the log for
42: * this entry.
43: *
44: * @param loggerThread the logger thread calling this method
45: */
46: void execute(LoggerThread loggerThread);
47:
48: }
|