1 9 package org.ozoneDB.tools; 10 11 import org.ozoneDB.DxLib.DxObject; 12 13 14 public class ClusterStats extends DxObject { 15 int member = 6; 16 int[] counter = new int[member]; 17 18 19 public ClusterStats() { 20 for (int i = 0; i < member; i++) { 21 counter[i] = 0; 22 } 23 } 24 25 26 public String toString() { 27 return 28 "\nobjects loaded : " + counter[0] + " cluster loaded : " + counter[3] + "\nobjects stored : " 29 + counter[1] + " cluster stored : " + counter[4] + "\nobjects deleted : " + counter[2] 30 + " cluster deleted : " + counter[5]; 31 } 32 33 34 public void objectLoaded() { 35 counter[0]++; 36 } 37 38 39 public void objectStored() { 40 counter[1]++; 41 } 42 43 44 public void objectDeleted() { 45 counter[2]++; 46 } 47 48 49 public void clusterLoaded() { 50 counter[3]++; 51 } 52 53 54 public void clusterStored() { 55 counter[4]++; 56 } 57 58 59 public void clusterDeleted() { 60 counter[5]++; 61 } 62 63 } 64 | Popular Tags |