Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

pass by value or pass by reference

 
Terrence Zhong
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm very confused about passing remote and non-remote objects. Does anyone know wether the following is passed by value or passed by reference?
1. pass non-remote object in non-remote function (pass by value? since the object is local)
2. pass non-remote object in remote function (pass by value? since the object is local)
3. pass remote object in non-remote function (not sure if this is possible)
4. pass remote object in remote function (pass by reference?)

Thank you!
 
Ram Narayan.M
Ranch Hand
Posts: 247
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In RPC, there is no place for "Pass by reference" as the remote entity does not have the exposure of the memory details of other remote entity...

As the objects are serialized and sent to remote end, objects will be de-serialized and reincarnates as object in heap... So Its all pass by value at their ends...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic