KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > continuent > sequoia > controller > virtualdatabase > protocol > NotifyDisableBackend


1 /**
2  * Sequoia: Database clustering technology.
3  * Copyright (C) 2002-2004 French National Institute For Research In Computer
4  * Science And Control (INRIA).
5  * Copyright (C) 2005 AmicoSoft, Inc. dba Emic Networks
6  * Copyright (C) 2005-2006 Continuent, Inc.
7  * Contact: sequoia@continuent.org
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  * Initial developer(s): Emmanuel Cecchet.
22  * Contributor(s): ______________________.
23  */

24
25 package org.continuent.sequoia.controller.virtualdatabase.protocol;
26
27 import java.io.Serializable JavaDoc;
28
29 import org.continuent.hedera.common.Member;
30 import org.continuent.sequoia.common.jmx.management.BackendInfo;
31 import org.continuent.sequoia.controller.virtualdatabase.DistributedVirtualDatabase;
32
33 /**
34  * Send the information that the sender wants to disable the specified backend.
35  *
36  * @author <a HREF="mailto:Emmanuel.Cecchet@inria.fr">Emmanuel Cecchet </a>
37  * @version 1.0
38  */

39 public class NotifyDisableBackend extends DistributedVirtualDatabaseMessage
40 {
41   private static final long serialVersionUID = 430250030369313030L;
42
43   private BackendInfo backendInfo;
44
45   /**
46    * Creates a new DisableBackend object with the specified backend information.
47    *
48    * @param backendInfo information on the backend to disable
49    */

50   public NotifyDisableBackend(BackendInfo backendInfo)
51   {
52     this.backendInfo = backendInfo;
53   }
54
55   /**
56    * @see org.continuent.sequoia.controller.virtualdatabase.protocol.DistributedVirtualDatabaseMessage#handleMessageSingleThreaded(org.continuent.sequoia.controller.virtualdatabase.DistributedVirtualDatabase,
57    * org.continuent.hedera.common.Member)
58    */

59   public Object JavaDoc handleMessageSingleThreaded(DistributedVirtualDatabase dvdb,
60       Member sender)
61   {
62     return null;
63   }
64
65   /**
66    * @see org.continuent.sequoia.controller.virtualdatabase.protocol.DistributedVirtualDatabaseMessage#handleMessageMultiThreaded(org.continuent.sequoia.controller.virtualdatabase.DistributedVirtualDatabase,
67    * org.continuent.hedera.common.Member, java.lang.Object)
68    */

69   public Serializable JavaDoc handleMessageMultiThreaded(
70       DistributedVirtualDatabase dvdb, Member sender,
71       Object JavaDoc handleMessageSingleThreadedResult)
72   {
73     dvdb.handleRemoteDisableBackendNotification(backendInfo
74         .getDatabaseBackend(dvdb), sender);
75     return null;
76   }
77
78 }
Popular Tags