Пример #1
0
 private void debugCheckBuffer(ByteArrayBuffer buffer, FreeSlotNode node) {
   if (!(buffer instanceof StatefulBuffer)) {
     return;
   }
   Transaction trans = ((StatefulBuffer) buffer).transaction();
   if (!(trans.container() instanceof IoAdaptedObjectContainer)) {
     return;
   }
   StatefulBuffer checker = trans.container().getWriter(trans, node._peer._key, node._key);
   checker.read();
   for (int i = 0; i < node._key; i++) {
     if (checker.readByte() != (byte) 'X') {
       System.out.println("!!! Free space corruption at:" + node._peer._key);
       break;
     }
   }
 }