Пример #1
0
 /**
  * Deserialize the content of this Transaction from {@code bytes}.
  *
  * @param bytes
  */
 private void deserialize(ByteBuffer bytes) {
   locks = Maps.newHashMap();
   Iterator<ByteBuffer> it =
       ByteableCollections.iterator(ByteBuffers.slice(bytes, bytes.getInt()));
   while (it.hasNext()) {
     LockDescription lock =
         LockDescription.fromByteBuffer(it.next(), lockService, rangeLockService);
     locks.put(lock.getToken(), lock);
   }
   it = ByteableCollections.iterator(bytes);
   while (it.hasNext()) {
     Write write = Write.fromByteBuffer(it.next());
     buffer.insert(write);
   }
 }