01: /**
02: * Sequoia: Database clustering technology.
03: * Copyright (C) 2002-2004 French National Institute For Research In Computer
04: * Science And Control (INRIA).
05: * Copyright (C) 2005 AmicoSoft, Inc. dba Emic Networks
06: * Contact: sequoia@continuent.org
07: *
08: * Licensed under the Apache License, Version 2.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.apache.org/licenses/LICENSE-2.0
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: * Initial developer(s): Emmanuel Cecchet.
21: * Contributor(s): Julie Marguerite.
22: */package org.continuent.sequoia.controller.recoverylog;
23:
24: import org.continuent.sequoia.controller.loadbalancer.tasks.AbstractTask;
25:
26: /**
27: * Recovery task containing an <code>AbstractTask</code> and the id of the
28: * task in the recovery log.
29: *
30: * @author <a href="mailto:Emmanuel.Cecchet@inria.fr">Emmanuel Cecchet </a>
31: * @author <a href="mailto:Julie.Marguerite@inria.fr">Julie Marguerite </a>
32: * @version 1.0
33: */
34: public class RecoveryTask {
35: private long id;
36: private long tid;
37: private AbstractTask task;
38: private String status;
39:
40: /**
41: * Constructs a new <code>RecoveryTask</code> instance.
42: *
43: * @param tid transaction id
44: * @param id task id in the recovery log
45: * @param task task to be executed
46: * @param status request execution status as defined in LogEntry constants
47: */
48: public RecoveryTask(long tid, long id, AbstractTask task,
49: String status) {
50: this .id = id;
51: this .tid = tid;
52: this .task = task;
53: this .status = status;
54: }
55:
56: /**
57: * Returns the id.
58: *
59: * @return int
60: */
61: public long getId() {
62: return id;
63: }
64:
65: /**
66: * Returns the status value.
67: *
68: * @return Returns the status.
69: */
70: public final String getStatus() {
71: return status;
72: }
73:
74: /**
75: * Returns the task.
76: *
77: * @return AbstractTask
78: */
79: public AbstractTask getTask() {
80: return task;
81: }
82:
83: /**
84: * Returns the tid value.
85: *
86: * @return Returns the tid.
87: */
88: public long getTid() {
89: return tid;
90: }
91:
92: }
|