1 21 package com.db4o.cs.messages; 22 23 import com.db4o.*; 24 import com.db4o.cs.*; 25 26 27 30 public class MObjectByUuid extends MsgD { 31 public final boolean processAtServer(YapServerThread serverThread) { 32 long uuid = readLong(); 33 byte[] signature = readBytes(); 34 int id = 0; 35 Transaction trans = transaction(); 36 synchronized (streamLock()) { 37 try { 38 Object [] arr = trans.objectAndYapObjectBySignature(uuid, signature); 39 if(arr[1] != null){ 40 YapObject yo = (YapObject)arr[1]; 41 id = yo.getID(); 42 } 43 } catch (Exception e) { 44 if(Deploy.debug){ 45 e.printStackTrace(); 46 } 47 } 48 } 49 serverThread.write(Msg.OBJECT_BY_UUID.getWriterForInt(trans, id)); 50 return true; 51 } 52 } 53 | Popular Tags |