Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
QueueConfiguration |
|
| 1.0;1 |
1 | /* | |
2 | * $Id: QueueConfiguration.java 7976 2007-08-21 14:26:13Z dirk.olmes $ | |
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 CPAL v1.0 | |
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: 7976 $ | |
16 | */ | |
17 | public class QueueConfiguration | |
18 | { | |
19 | ||
20 | protected int capacity; | |
21 | protected boolean persistent; | |
22 | ||
23 | public QueueConfiguration(int capacity, boolean persistent) | |
24 | 0 | { |
25 | 0 | this.capacity = capacity; |
26 | 0 | this.persistent = persistent; |
27 | 0 | } |
28 | ||
29 | public QueueConfiguration(int capacity) | |
30 | { | |
31 | 0 | this(capacity, false); |
32 | 0 | } |
33 | ||
34 | public QueueConfiguration(boolean persistent) | |
35 | { | |
36 | 0 | this(0, persistent); |
37 | 0 | } |
38 | ||
39 | public QueueConfiguration() | |
40 | { | |
41 | 0 | this(0, false); |
42 | 0 | } |
43 | ||
44 | /** | |
45 | * @return Returns the capacity. | |
46 | */ | |
47 | public int getCapacity() | |
48 | { | |
49 | 0 | return capacity; |
50 | } | |
51 | ||
52 | /** | |
53 | * @param capacity The capacity to set. | |
54 | */ | |
55 | public void setCapacity(int capacity) | |
56 | { | |
57 | 0 | this.capacity = capacity; |
58 | 0 | } |
59 | ||
60 | /** | |
61 | * @return Returns the persistent. | |
62 | */ | |
63 | public boolean isPersistent() | |
64 | { | |
65 | 0 | return persistent; |
66 | } | |
67 | ||
68 | /** | |
69 | * @param persistent The persistent to set. | |
70 | */ | |
71 | public void setPersistent(boolean persistent) | |
72 | { | |
73 | 0 | this.persistent = persistent; |
74 | 0 | } |
75 | ||
76 | } |