1 8 9 package com.sleepycat.je; 10 11 15 public class SequenceConfig { 16 17 public static final SequenceConfig DEFAULT = new SequenceConfig(); 18 19 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 26 private boolean allowCreate; 27 private boolean decrement; 28 private boolean exclusiveCreate; 29 private boolean autoCommitNoSync; 30 private boolean wrap; 31 32 36 public SequenceConfig() { 37 } 38 39 43 public void setAllowCreate(boolean allowCreate) { 44 this.allowCreate = allowCreate; 45 } 46 47 51 public boolean getAllowCreate() { 52 return allowCreate; 53 } 54 55 59 public void setCacheSize(int cacheSize) { 60 this.cacheSize = cacheSize; 61 } 62 63 67 public int getCacheSize() { 68 return cacheSize; 69 } 70 71 75 public void setDecrement(boolean decrement) { 76 this.decrement = decrement; 77 } 78 79 83 public boolean getDecrement() { 84 return decrement; 85 } 86 87 91 public void setExclusiveCreate(boolean exclusiveCreate) { 92 this.exclusiveCreate = exclusiveCreate; 93 } 94 95 99 public boolean getExclusiveCreate() { 100 return exclusiveCreate; 101 } 102 103 107 public void setInitialValue(long initialValue) { 108 this.initialValue = initialValue; 109 } 110 111 115 public long getInitialValue() { 116 return initialValue; 117 } 118 119 123 public void setAutoCommitNoSync(boolean autoCommitNoSync) { 124 this.autoCommitNoSync = autoCommitNoSync; 125 } 126 127 131 public boolean getAutoCommitNoSync() { 132 return autoCommitNoSync; 133 } 134 135 139 public void setRange(long min, long max) { 140 this.rangeMin = min; 141 this.rangeMax = max; 142 } 143 144 148 public long getRangeMin() { 149 return rangeMin; 150 } 151 152 156 public long getRangeMax() { 157 return rangeMax; 158 } 159 160 164 public void setWrap(boolean wrap) { 165 this.wrap = wrap; 166 } 167 168 172 public boolean getWrap() { 173 return wrap; 174 } 175 } 176 | Popular Tags |