Logger.debug("Release Write-Set");
for(AbstractDistinguishable obj: writeSet){
if(LockTable.setAndReleaseLock( obj, newClock, locksMarker)){ // is it remote
AbstractDistinguishable object = (AbstractDistinguishable)obj;
GlobalObject key = ObjectsRegistery.getKey(object.getId());
if(key==null){
System.out.println("TTTTT:"+object.getId());
continue;
}
key.setHome(PE.thisPE()); // me is the new owner
ObjectsRegistery.regsiterObject(key); // register key local
locator.newObject(key, object); // register at the directory manager
PE.thisPE().populate(new RegisterObject(key)); // populate me as the new owner
Logger.debug("Populate me owner of " + key);
// FIXME: if more than one local transaction at this node then we should release the object now not before changing its location
}
}
//System.out.println(" Wake up other tasks " + tid);
for(Object obj : objPrevOwnerAddressMap.keySet()) {
//System.out.println("From my address " + PE.thisPE().getAddress() + " Send signal request to " + obj + " owner" + objPrevOwnerAddressMap.get(obj));
if(!objPrevOwnerAddressMap.get(obj).equals(PE.thisPE().getAddress())) {
//try {
AbstractDistinguishable object = (AbstractDistinguishable)obj;
GlobalObject key = ObjectsRegistery.getKey(object.getId());
//CommunicationManager.getManager().send(objPrevOwnerAddressMap.get(obj), new SignalWaitingTxRequest(key, tid, obj, deadline_ts, period_ts));
TransactionWaitQueue.remoteWaitQueueRequest(this, key, object);
//} catch (IOException ex) {
// ex.printStackTrace();
//}