2 * Copyright (c) 2003-2005 The BISON Project
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License version 2 as
6 * published by the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 * Instances of classes implementing this interface
24 * maintain a fail state, i.e. information about the availability
27 public interface Fallible {
31 * Fail state which indicates that the object is operating normally.
36 * Fail state indicating that the object is dead and recovery is
37 * not possible. When this state is set, it is a good idea to make sure
38 * that the state of the object becomes such that any attempt to
39 * operate on it causes a visible error of some kind.
44 * Fail state indicating that the object is not dead, but is temporarily
50 * Returns the state of this object. Must be one of the constants
51 * defined in interface {@link Fallible}.
53 public int getFailState();
56 * Sets the fails state of this object. Parameter must be one of the
57 * constants defined in interface {@link Fallible}.
59 public void setFailState(int failState);
62 * Convenience method to check if the node is up and running
63 * @return must return true if and only if
64 * <code>getFailState()==OK</code>
66 public boolean isUp();