001: /**
002: * Sequoia: Database clustering technology.
003: * Copyright (C) 2006 Continuent, Inc.
004: * Contact: sequoia@continuent.org
005: *
006: * Licensed under the Apache License, Version 2.0 (the "License");
007: * you may not use this file except in compliance with the License.
008: * You may obtain a copy of the License at
009: *
010: * http://www.apache.org/licenses/LICENSE-2.0
011: *
012: * Unless required by applicable law or agreed to in writing, software
013: * distributed under the License is distributed on an "AS IS" BASIS,
014: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015: * See the License for the specific language governing permissions and
016: * limitations under the License.
017: *
018: * Initial developer(s): Damian Arregui.
019: * Contributor(s): ______________________.
020: */package org.continuent.sequoia.controller.virtualdatabase.protocol;
021:
022: import java.io.Serializable;
023: import java.util.List;
024:
025: import org.continuent.hedera.common.Member;
026: import org.continuent.sequoia.controller.virtualdatabase.DistributedVirtualDatabase;
027:
028: /**
029: * Transports the response to a <code>VirtualDatabaseConfiguration</code>
030: * message.
031: *
032: * @author <a href="mailto:damian.arregui@continuent.com">Damián Arregui</a>
033: * @version 1.0
034: */
035: public class VirtualDatabaseConfigurationResponse extends
036: DistributedVirtualDatabaseMessage {
037: private static final long serialVersionUID = -6800865688275066016L;
038:
039: private long controllerId;
040: private List additionalVdbUsers;
041:
042: /**
043: * Creates a new <code>VirtualDatabaseConfigurationResponse</code> object
044: *
045: * @param controllerId the responsding controller id or
046: * <code>DistributedVirtualDatabase.INCOMPATIBLE_CONFIGURATION</code>
047: * if the configurations are not compatible.
048: * @param additionalVdbUsers a list of <code>VirtualDatabaseUser</code>
049: * objects if the responding controller has additional vdb users,
050: * null otherwise.
051: */
052: public VirtualDatabaseConfigurationResponse(long controllerId,
053: List additionalVdbUsers) {
054: this .controllerId = controllerId;
055: this .additionalVdbUsers = additionalVdbUsers;
056: }
057:
058: /**
059: * Returns the additional vdb users in the local configuration with respect to
060: * the remote configuration.
061: *
062: * @return a <code>List</code> of VirtualDatabaseUser objects or null if
063: * there are no additional vdb users.
064: */
065: public List getAdditionalVdbUsers() {
066: return additionalVdbUsers;
067: }
068:
069: /**
070: * Returns the local controller id.
071: *
072: * @return the local controller id or
073: * <code>DistributedVirtualDatabase.INCOMPATIBLE_CONFIGURATION</code>
074: * if the configurations are not compatible.
075: */
076: public long getControllerId() {
077: return controllerId;
078: }
079:
080: /**
081: * @see org.continuent.sequoia.controller.virtualdatabase.protocol.DistributedVirtualDatabaseMessage#handleMessageSingleThreaded(org.continuent.sequoia.controller.virtualdatabase.DistributedVirtualDatabase,
082: * org.continuent.hedera.common.Member)
083: */
084: public Object handleMessageSingleThreaded(
085: DistributedVirtualDatabase dvdb, Member sender) {
086: // TODO Auto-generated method stub
087: return null;
088: }
089:
090: /**
091: * @see org.continuent.sequoia.controller.virtualdatabase.protocol.DistributedVirtualDatabaseMessage#handleMessageMultiThreaded(org.continuent.sequoia.controller.virtualdatabase.DistributedVirtualDatabase,
092: * org.continuent.hedera.common.Member, java.lang.Object)
093: */
094: public Serializable handleMessageMultiThreaded(
095: DistributedVirtualDatabase dvdb, Member sender,
096: Object handleMessageSingleThreadedResult) {
097: // TODO Auto-generated method stub
098: return null;
099: }
100:
101: }
|