01: package org.jacorb.concurrency;
02:
03: /*
04: * JacORB concurrency control service - a free CCS for JacORB
05: *
06: * Copyright (C) 1999-2004 LogicLand group, Viacheslav Tararin.
07: *
08: * This library is free software; you can redistribute it and/or
09: * modify it under the terms of the GNU Library General Public
10: * License as published by the Free Software Foundation; either
11: * version 2 of the License, or (at your option) any later version.
12: *
13: * This library is distributed in the hope that it will be useful,
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16: * Library General Public License for more details.
17: *
18: * You should have received a copy of the GNU Library General Public
19: * License along with this library; if not, write to the Free
20: * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21: */
22:
23: import org.omg.CosConcurrencyControl.lock_mode;
24:
25: public class Request {
26: public static final int LOCK = 1;
27: public static final int CHANGE = 3;
28:
29: public int state;
30: public TransactionCoordinator current;
31: public int to_do;
32: public lock_mode set_mode;
33: public lock_mode reset_mode;
34:
35: public String toString() {
36: String s = current.get_coordinator().get_transaction_name()
37: + ": state=" + state + " to_do="
38: + (to_do == LOCK ? "lock" : "chng") + " set=";
39:
40: if (set_mode == null) {
41: s = s + "null";
42: } else {
43: s = s + set_mode.value();
44: }
45: s = s + " reset=";
46: if (reset_mode == null) {
47: s = s + "null";
48: } else {
49: s = s + reset_mode.value();
50: }
51: return s;
52: };
53:
54: }
|