KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*-
2  * See the file LICENSE for redistribution information.
3  *
4  * Copyright (c) 2002,2006 Oracle. All rights reserved.
5  *
6  * $Id: TransactionConfig.java,v 1.15 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
13  * via the doc templates in the doc_src directory.
14  */

15 public class TransactionConfig implements Cloneable JavaDoc {
16
17     /**
18      * Javadoc for this public method is generated via
19      * the doc templates in the doc_src directory.
20      */

21     public static final TransactionConfig DEFAULT = new TransactionConfig();
22
23     private boolean sync = false;
24     private boolean noSync = false;
25     private boolean writeNoSync = false;
26     private boolean noWait = false;
27     private boolean readUncommitted = false;
28     private boolean readCommitted = false;
29     private boolean serializableIsolation = false;
30
31     /**
32      * Javadoc for this public method is generated via
33      * the doc templates in the doc_src directory.
34      */

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

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

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

58     public void setNoSync(boolean noSync) {
59         this.noSync = noSync;
60     }
61
62     /**
63      * Javadoc for this public method is generated via
64      * the doc templates in the doc_src directory.
65      */

66     public boolean getNoSync() {
67         return noSync;
68     }
69
70     /**
71      * Javadoc for this public method is generated via
72      * the doc templates in the doc_src directory.
73      */

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

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

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

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

106     public void setReadUncommitted(boolean readUncommitted) {
107         this.readUncommitted = readUncommitted;
108     }
109     
110     /**
111      * Javadoc for this public method is generated via
112      * the doc templates in the doc_src directory.
113      */

114     public boolean getReadUncommitted() {
115         return readUncommitted;
116     }
117
118     /**
119      * Javadoc for this public method is generated via
120      * the doc templates in the doc_src directory.
121      * @deprecated
122      */

123     public void setDirtyRead(boolean dirtyRead) {
124         setReadUncommitted(dirtyRead);
125     }
126     
127     /**
128      * Javadoc for this public method is generated via
129      * the doc templates in the doc_src directory.
130      * @deprecated
131      */

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

140     public void setReadCommitted(boolean readCommitted) {
141         this.readCommitted = readCommitted;
142     }
143     
144     /**
145      * Javadoc for this public method is generated via
146      * the doc templates in the doc_src directory.
147      */

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

156     public void setSerializableIsolation(boolean serializableIsolation) {
157         this.serializableIsolation = serializableIsolation;
158     }
159
160     /**
161      * Javadoc for this public method is generated via
162      * the doc templates in the doc_src directory.
163      */

164     public boolean getSerializableIsolation() {
165         return serializableIsolation;
166     }
167
168     /**
169      * Used by Environment to create a copy of the application
170      * supplied configuration. Done this way to provide non-public cloning.
171      */

172     TransactionConfig cloneConfig() {
173         try {
174             return (TransactionConfig) super.clone();
175         } catch (CloneNotSupportedException JavaDoc willNeverOccur) {
176             return null;
177         }
178     }
179 }
180
Popular Tags