Changeset 28 for branches/multithread/src/planet/simulate/Results.java
- Timestamp:
- 10/02/07 12:49:26 (1 year ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/multithread/src/planet/simulate/Results.java
r19 r28 26 26 27 27 28 public static synchronizedvoid incStabRate() {28 public static void incStabRate() { 29 29 stabRate++; 30 30 } 31 31 32 public static synchronizedvoid clearStabRate() {32 public static void clearStabRate() { 33 33 stabRate=0; 34 34 } 35 35 36 public static synchronizedint getStabRate() {36 public static int getStabRate() { 37 37 return stabRate; 38 38 } … … 50 50 } 51 51 52 public static synchronizedint getTraffic() {52 public static int getTraffic() { 53 53 return traffic; 54 54 } … … 57 57 58 58 //type --> in/out 59 public static synchronizedvoid numMessagesTime(Id id, int step, int num, String type) {59 public static void numMessagesTime(Id id, int step, int num, String type) { 60 60 updateNodeStress(id,num,type); 61 61 addMaxMessages(id,step,num,type); … … 138 138 } 139 139 140 public static synchronizedvoid addInsert(String key,String dest) {140 public static void addInsert(String key,String dest) { 141 141 inserts.put(key,dest); 142 142 } 143 143 144 public static synchronizedString getInsert(String key) {144 public static String getInsert(String key) { 145 145 return (String) inserts.get(key); 146 146 } 147 147 148 public static synchronizedvoid resetInserts() {148 public static void resetInserts() { 149 149 inserts.clear(); 150 150 } 151 151 152 public static synchronizedHashtable getAllInserts() {152 public static Hashtable getAllInserts() { 153 153 return (Hashtable) inserts.clone(); 154 154 } 155 155 156 public static synchronizedvoid addLookup(Id key, Id own) {156 public static void addLookup(Id key, Id own) { 157 157 lookups.put(key,own); 158 158 } 159 159 160 public static synchronizedId getLookup(Id key) {160 public static Id getLookup(Id key) { 161 161 return ((Id) lookups.get(key)); 162 162 } 163 163 164 public static synchronizedvoid resetLookups(){164 public static void resetLookups(){ 165 165 lookups.clear(); 166 166 } 167 167 168 public static synchronizedHashtable getAllLookups() {168 public static Hashtable getAllLookups() { 169 169 return (Hashtable) lookups.clone(); 170 170 } 171 171 172 public static synchronizedvoid print () {172 public static void print () { 173 173 long total_in_msg = 0; 174 174 long total_out_msg = 0; … … 223 223 * print total and average hops 224 224 */ 225 public static synchronizedvoid printhops() {225 public static void printhops() { 226 226 Collection keys = hops.keySet(); 227 227 Iterator it = keys.iterator(); … … 255 255 } 256 256 257 public static synchronizedint getLookup_number() {257 public static int getLookup_number() { 258 258 return lookup_number; 259 259 }
