KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mule > util > queue > QueueConfiguration


1 /*
2  * $Id: QueueConfiguration.java 3167 2006-09-22 15:47:04Z holger $
3  * --------------------------------------------------------------------------------------
4  * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
5  *
6  * The software in this package is published under the terms of the MuleSource MPL
7  * license, a copy of which has been included with this distribution in the
8  * LICENSE.txt file.
9  */

10
11 package org.mule.util.queue;
12
13 /**
14  * @author <a HREF="mailto:gnt@codehaus.org">Guillaume Nodet</a>
15  * @version $Revision: 3167 $
16  */

17 public class QueueConfiguration
18 {
19
20     protected int capacity;
21     protected boolean persistent;
22
23     public QueueConfiguration(int capacity, boolean persistent)
24     {
25         this.capacity = capacity;
26         this.persistent = persistent;
27     }
28
29     public QueueConfiguration(int capacity)
30     {
31         this(capacity, false);
32     }
33
34     public QueueConfiguration(boolean persistent)
35     {
36         this(0, persistent);
37     }
38
39     public QueueConfiguration()
40     {
41         this(0, false);
42     }
43
44     /**
45      * @return Returns the capacity.
46      */

47     public int getCapacity()
48     {
49         return capacity;
50     }
51
52     /**
53      * @param capacity The capacity to set.
54      */

55     public void setCapacity(int capacity)
56     {
57         this.capacity = capacity;
58     }
59
60     /**
61      * @return Returns the persistent.
62      */

63     public boolean isPersistent()
64     {
65         return persistent;
66     }
67
68     /**
69      * @param persistent The persistent to set.
70      */

71     public void setPersistent(boolean persistent)
72     {
73         this.persistent = persistent;
74     }
75
76 }
77
Popular Tags