public Object lock_write(int id, Client_itf client) throws java.rmi.RemoteException { mutex.lock(); ServerObject object = objects.get(id); mutex.unlock(); object.lock_write(client); return object.getObj(); }
public LookupResponse lookup(String name) throws java.rmi.RemoteException { log.info(String.format("lookup \"%s\"", name)); mutex.lock(); ServerObject so = name_mapping.get(name); mutex.unlock(); if (so == null) return new LookupResponse(); else return new LookupResponse(so.getId(), so.getObj().getClass()); }