KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > activemq > broker > region > policy > FilePendingSubscriberMessageStoragePolicy


1 /**
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
4  * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
5  * to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the
6  * License. You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
11  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
12  * specific language governing permissions and limitations under the License.
13  */

14 package org.apache.activemq.broker.region.policy;
15
16 import org.apache.activemq.broker.region.cursors.FilePendingMessageCursor;
17 import org.apache.activemq.broker.region.cursors.PendingMessageCursor;
18 import org.apache.activemq.kaha.Store;
19
20
21 /**
22  * Creates a PendIngMessageCursor for Durable subscribers
23  * *
24  * @org.apache.xbean.XBean element="fileCursor" description="Pending messages for durable subscribers
25  * held in temporary files"
26  *
27  * @version $Revision$
28  */

29 public class FilePendingSubscriberMessageStoragePolicy implements PendingSubscriberMessageStoragePolicy{
30
31     /**
32      * @param name
33      * @param tmpStorage
34      * @param maxBatchSize
35      * @return a Cursor
36      * @see org.apache.activemq.broker.region.policy.PendingSubscriberMessageStoragePolicy#getSubscriberPendingMessageCursor(java.lang.String, org.apache.activemq.kaha.Store, int)
37      */

38     public PendingMessageCursor getSubscriberPendingMessageCursor(String JavaDoc name,Store tmpStorage,int maxBatchSize){
39         return new FilePendingMessageCursor("PendingCursor:" + name,tmpStorage);
40     }
41 }
42
Popular Tags