-// TODO: delete method
-synchronized void Table::printSlots() {
- int64_t o = buffer.getOldestSeqNum();
- int64_t n = buffer.getNewestSeqNum();
-
- Array<int> *types = new Array<int>(10);
-
- int num = 0;
-
- int livec = 0;
- int deadc = 0;
-
- int casdasd = 0;
-
- int liveslo = 0;
-
- for (int64_t i = o; i < (n + 1); i++) {
- Slot s = buffer.getSlot(i);
-
-
- if (s.isLive()) {
- liveslo++;
- }
-
- Vector<Entry> entries = s.getEntries();
-
- for (Entry e : entries) {
- if (e.isLive()) {
- int type = e.getType();
-
-
- if (type == 6) {
- RejectedMessage rej = (RejectedMessage)e;
- casdasd++;
-
- System.out.println(rej.getMachineID());
- }
-
-
- types[type] = types[type] + 1;
- num++;
- livec++;
- } else {
- deadc++;
- }
- }
- }
-
- for (int i = 0; i < 10; i++) {
- System.out.println(i + " " + types[i]);
- }
- System.out.println("Live count: " + livec);
- System.out.println("Live Slot count: " + liveslo);
-
- System.out.println("Dead count: " + deadc);
- System.out.println("Old: " + o);
- System.out.println("New: " + n);
- System.out.println("Size: " + buffer.size());
- // System.out.println("Commits: " + liveCommitsTable.size());
- System.out.println("pendingTrans: " + pendingTransactionQueue.size());
- System.out.println("Trans Status Out: " + outstandingTransactionStatus.size());
-
- for (Long k : lastArbitratedTransactionNumberByArbitratorTable.keySet()) {
- System.out.println(k + ": " + lastArbitratedTransactionNumberByArbitratorTable.get(k));
- }
-
-
- for (Long a : liveCommitsTable.keySet()) {
- for (Long b : liveCommitsTable.get(a).keySet()) {
- for (KeyValue kv : liveCommitsTable.get(a).get(b).getKeyValueUpdateSet()) {
- System.out.print(kv + " ");
- }
- System.out.print("|| ");
- }
- System.out.println();
- }
-
-}
-