KickJava   Java API By Example, From Geeks To Geeks.

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


1 /**
2  * Sequoia: Database clustering technology.
3  * Copyright (C) 2006 Continuent, Inc.
4  * Contact: sequoia@continuent.org
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
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): Emmanuel Cecchet.
19  * Contributor(s): ______________________.
20  */

21
22 package org.continuent.sequoia.controller.virtualdatabase.protocol;
23
24 import java.io.Serializable JavaDoc;
25
26 import org.continuent.hedera.common.Member;
27 import org.continuent.sequoia.controller.virtualdatabase.DistributedVirtualDatabase;
28
29 /**
30  * This class defines a GetRequestResultFromFailoverCache message that fetches
31  * the result of a specific request identified by its unique id in the failover
32  * cache.
33  *
34  * @author <a HREF="mailto:emmanuel.cecchet@continuent.com">Emmanuel Cecchet</a>
35  * @version 1.0
36  */

37 public class GetRequestResultFromFailoverCache
38     extends DistributedVirtualDatabaseMessage
39 {
40   private static final long serialVersionUID = 4366642512317344521L;
41
42   private long requestId;
43
44   /**
45    * Creates a new <code>GetRequestResultFromFailoverCache</code> object
46    *
47    * @param id request id to look for
48    */

49   public GetRequestResultFromFailoverCache(long id)
50   {
51     this.requestId = id;
52   }
53
54   /**
55    * @see org.continuent.sequoia.controller.virtualdatabase.protocol.DistributedVirtualDatabaseMessage#handleMessageSingleThreaded(org.continuent.sequoia.controller.virtualdatabase.DistributedVirtualDatabase,
56    * org.continuent.hedera.common.Member)
57    */

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

68   public Serializable JavaDoc handleMessageMultiThreaded(
69       DistributedVirtualDatabase dvdb, Member sender,
70       Object JavaDoc handleMessageSingleThreadedResult)
71   {
72     return dvdb.getRequestResultFailoverCache().retrieve(requestId);
73   }
74
75 }
76
Popular Tags