01: /**
02: * Sequoia: Database clustering technology.
03: * Copyright (C) 2006 Continuent, Inc.
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): Gilles Rayrat.
19: * Contributor(s): ______________________.
20: */package org.continuent.sequoia.driver;
21:
22: /**
23: * Provides the two methods that will be called when a controller is detected as
24: * failed (does not respond to pings anymore) or as back alive (responds to
25: * pings again after silence). Note that the <b>processing time</b> of these
26: * two methods implementation <b>is critical</b>: if needed, thread them!
27: *
28: * @author <a href="mailto:gilles.rayrat@continuent.com">Gilles Rayrat</a>
29: * @version 1.0
30: */
31: public interface ControllerStateChangedCallback {
32: /**
33: * What to do when a controller stops responding to pings?<br>
34: * Warning: execution time is critical here, if the method's implementation is
35: * too slow, thread it!
36: */
37: void onControllerDown(ControllerInfo ctrl);
38:
39: /**
40: * What to do when a controller responds again to pings after having been
41: * detected as failed<br>
42: * Warning: execution time is critical here, if the method's implementation is
43: * too slow, thread it!
44: */
45: void onControllerUp(ControllerInfo ctrl);
46: }
|