Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 8 9 package com.sleepycat.je; 10 11 15 public class CursorConfig implements Cloneable { 16 17 21 public static final CursorConfig DEFAULT = new CursorConfig(); 22 23 27 public static final CursorConfig READ_UNCOMMITTED = new CursorConfig(); 28 29 34 public static final CursorConfig DIRTY_READ = READ_UNCOMMITTED; 35 36 40 public static final CursorConfig READ_COMMITTED = new CursorConfig(); 41 42 static { 43 READ_UNCOMMITTED.setReadUncommitted(true); 44 READ_COMMITTED.setReadCommitted(true); 45 } 46 47 private boolean readUncommitted = false; 48 private boolean readCommitted = false; 49 50 54 public CursorConfig() { 55 } 56 57 61 public void setReadUncommitted(boolean readUncommitted) { 62 this.readUncommitted = readUncommitted; 63 } 64 65 69 public boolean getReadUncommitted() { 70 return readUncommitted; 71 } 72 73 78 public void setDirtyRead(boolean dirtyRead) { 79 setReadUncommitted(dirtyRead); 80 } 81 82 87 public boolean getDirtyRead() { 88 return getReadUncommitted(); 89 } 90 91 95 public void setReadCommitted(boolean readCommitted) { 96 this.readCommitted = readCommitted; 97 } 98 99 103 public boolean getReadCommitted() { 104 return readCommitted; 105 } 106 107 111 CursorConfig cloneConfig() { 112 try { 113 return (CursorConfig) super.clone(); 114 } catch (CloneNotSupportedException willNeverOccur) { 115 return null; 116 } 117 } 118 } 119
| Popular Tags
|