01: /**
02: * Sequoia: Database clustering technology.
03: * Copyright (C) 2005 AmicoSoft, Inc. dba Emic Networks
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): Damian Arregui.
19: * Contributor(s): ______________________.
20: */package org.continuent.sequoia.controller.virtualdatabase.protocol;
21:
22: import java.io.Serializable;
23:
24: import org.continuent.hedera.common.Member;
25: import org.continuent.sequoia.common.users.VirtualDatabaseUser;
26: import org.continuent.sequoia.controller.virtualdatabase.DistributedVirtualDatabase;
27:
28: /**
29: * This class defines a RemoveVirtualDatabaseUser
30: *
31: * @author <a href="mailto:Damian.Arregui@continuent.com">Damian Arregui</a>
32: * @version 1.0
33: */
34: public class RemoveVirtualDatabaseUser extends
35: DistributedVirtualDatabaseMessage {
36: private static final long serialVersionUID = 3540385303614037735L;
37:
38: private VirtualDatabaseUser vdbUser;
39:
40: /**
41: * Creates a new <code>RemoveVirtualDatabaseUser</code> object
42: *
43: * @param vdbUser user to be removed from backends.
44: */
45: public RemoveVirtualDatabaseUser(VirtualDatabaseUser vdbUser) {
46: this .vdbUser = vdbUser;
47: }
48:
49: /**
50: * @see org.continuent.sequoia.controller.virtualdatabase.protocol.DistributedVirtualDatabaseMessage#handleMessageMultiThreaded(org.continuent.sequoia.controller.virtualdatabase.DistributedVirtualDatabase,
51: * org.continuent.hedera.common.Member, java.lang.Object)
52: */
53: public Serializable handleMessageMultiThreaded(
54: DistributedVirtualDatabase dvdb, Member sender,
55: Object handleMessageSingleThreadedResult) {
56: return (Serializable) handleMessageSingleThreadedResult;
57: }
58:
59: /**
60: * @see org.continuent.sequoia.controller.virtualdatabase.protocol.DistributedVirtualDatabaseMessage#handleMessageSingleThreaded(org.continuent.sequoia.controller.virtualdatabase.DistributedVirtualDatabase,
61: * org.continuent.hedera.common.Member)
62: */
63: public Object handleMessageSingleThreaded(
64: DistributedVirtualDatabase dvdb, Member sender) {
65: dvdb.performRemoveVirtualDatabaseUser(vdbUser);
66: return null;
67: }
68: }
|