1 18 19 20 package sync4j.framework.core; 21 22 29 public final class DSMem 30 implements java.io.Serializable { 31 32 private Boolean sharedMem; 34 private long maxMem ; 35 private long maxID ; 36 37 39 40 protected DSMem() {} 41 42 51 public DSMem(final boolean sharedMem, final long maxMem, final long maxID) { 52 setMaxMem(maxMem); 53 setMaxID(maxID); 54 this.sharedMem = (sharedMem) ? new Boolean (sharedMem) : null; 55 56 } 57 58 60 65 public boolean isSharedMem() { 66 return (sharedMem != null); 67 } 68 69 74 public void setSharedMem(Boolean sharedMem) { 75 this.sharedMem = (sharedMem.booleanValue()) ? sharedMem : null; 76 } 77 78 83 public Boolean getSharedMem() { 84 if (!sharedMem.booleanValue()) { 85 return null; 86 } 87 return sharedMem; 88 } 89 90 95 public long getMaxMem() { 96 return this.maxMem; 97 } 98 99 105 public void setMaxMem(long maxMem) { 106 this.maxMem = maxMem; 107 } 108 109 114 public long getMaxID() { 115 return this.maxID; 116 } 117 118 123 public void setMaxID(long maxID) { 124 this.maxID = maxID; 125 } 126 } 127 | Popular Tags |