01: /*
02: * $Id: QueueConfiguration.java 8077 2007-08-27 20:15:25Z aperepel $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
10:
11: package org.mule.util.queue;
12:
13: public class QueueConfiguration {
14:
15: protected int capacity;
16: protected boolean persistent;
17:
18: public QueueConfiguration(int capacity, boolean persistent) {
19: this .capacity = capacity;
20: this .persistent = persistent;
21: }
22:
23: public QueueConfiguration(int capacity) {
24: this (capacity, false);
25: }
26:
27: public QueueConfiguration(boolean persistent) {
28: this (0, persistent);
29: }
30:
31: public QueueConfiguration() {
32: this (0, false);
33: }
34:
35: /**
36: * @return Returns the capacity.
37: */
38: public int getCapacity() {
39: return capacity;
40: }
41:
42: /**
43: * @param capacity The capacity to set.
44: */
45: public void setCapacity(int capacity) {
46: this .capacity = capacity;
47: }
48:
49: /**
50: * @return Returns the persistent.
51: */
52: public boolean isPersistent() {
53: return persistent;
54: }
55:
56: /**
57: * @param persistent The persistent to set.
58: */
59: public void setPersistent(boolean persistent) {
60: this.persistent = persistent;
61: }
62:
63: }
|