KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sleepycat > je > SequenceConfig


1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2005,2006 Oracle. All rights reserved.
5  *
6  * $Id: SequenceConfig.java,v 1.6 2006/10/30 21:14:12 bostic Exp $
7  */

8
9 package com.sleepycat.je;
10
11 /**
12  * Javadoc for this public class is generated via
13  * the doc templates in the doc_src directory.
14  */

15 public class SequenceConfig {
16
17     public static final SequenceConfig DEFAULT = new SequenceConfig();
18
19     /* Parameters */
20     private int cacheSize = 0;
21     private long rangeMin = Long.MIN_VALUE;
22     private long rangeMax = Long.MAX_VALUE;
23     private long initialValue = 0L;
24
25     /* Flags */
26     private boolean allowCreate;
27     private boolean decrement;
28     private boolean exclusiveCreate;
29     private boolean autoCommitNoSync;
30     private boolean wrap;
31
32     /**
33      * Javadoc for this public method is generated via
34      * the doc templates in the doc_src directory.
35      */

36     public SequenceConfig() {
37     }
38
39     /**
40      * Javadoc for this public method is generated via
41      * the doc templates in the doc_src directory.
42      */

43     public void setAllowCreate(boolean allowCreate) {
44         this.allowCreate = allowCreate;
45     }
46
47     /**
48      * Javadoc for this public method is generated via
49      * the doc templates in the doc_src directory.
50      */

51     public boolean getAllowCreate() {
52         return allowCreate;
53     }
54
55     /**
56      * Javadoc for this public method is generated via
57      * the doc templates in the doc_src directory.
58      */

59     public void setCacheSize(int cacheSize) {
60         this.cacheSize = cacheSize;
61     }
62
63     /**
64      * Javadoc for this public method is generated via
65      * the doc templates in the doc_src directory.
66      */

67     public int getCacheSize() {
68         return cacheSize;
69     }
70
71     /**
72      * Javadoc for this public method is generated via
73      * the doc templates in the doc_src directory.
74      */

75     public void setDecrement(boolean decrement) {
76         this.decrement = decrement;
77     }
78
79     /**
80      * Javadoc for this public method is generated via
81      * the doc templates in the doc_src directory.
82      */

83     public boolean getDecrement() {
84          return decrement;
85     }
86
87     /**
88      * Javadoc for this public method is generated via
89      * the doc templates in the doc_src directory.
90      */

91     public void setExclusiveCreate(boolean exclusiveCreate) {
92         this.exclusiveCreate = exclusiveCreate;
93     }
94
95     /**
96      * Javadoc for this public method is generated via
97      * the doc templates in the doc_src directory.
98      */

99     public boolean getExclusiveCreate() {
100         return exclusiveCreate;
101     }
102
103     /**
104      * Javadoc for this public method is generated via
105      * the doc templates in the doc_src directory.
106      */

107     public void setInitialValue(long initialValue) {
108         this.initialValue = initialValue;
109     }
110
111     /**
112      * Javadoc for this public method is generated via
113      * the doc templates in the doc_src directory.
114      */

115     public long getInitialValue() {
116         return initialValue;
117     }
118
119     /**
120      * Javadoc for this public method is generated via
121      * the doc templates in the doc_src directory.
122      */

123     public void setAutoCommitNoSync(boolean autoCommitNoSync) {
124         this.autoCommitNoSync = autoCommitNoSync;
125     }
126
127     /**
128      * Javadoc for this public method is generated via
129      * the doc templates in the doc_src directory.
130      */

131     public boolean getAutoCommitNoSync() {
132         return autoCommitNoSync;
133     }
134
135     /**
136      * Javadoc for this public method is generated via
137      * the doc templates in the doc_src directory.
138      */

139     public void setRange(long min, long max) {
140         this.rangeMin = min;
141         this.rangeMax = max;
142     }
143
144     /**
145      * Javadoc for this public method is generated via
146      * the doc templates in the doc_src directory.
147      */

148     public long getRangeMin() {
149         return rangeMin;
150     }
151
152     /**
153      * Javadoc for this public method is generated via
154      * the doc templates in the doc_src directory.
155      */

156     public long getRangeMax() {
157         return rangeMax;
158     }
159
160     /**
161      * Javadoc for this public method is generated via
162      * the doc templates in the doc_src directory.
163      */

164     public void setWrap(boolean wrap) {
165         this.wrap = wrap;
166     }
167
168     /**
169      * Javadoc for this public method is generated via
170      * the doc templates in the doc_src directory.
171      */

172     public boolean getWrap() {
173         return wrap;
174     }
175 }
176
Popular Tags