Message objects *don't* have mutators and are conceptually a copy of the 
relevant builder object.

--Chris

On Feb 20, 2012, at 10:22 AM, Tom Swirly <t...@swirly.com> wrote:

> The documentation says it's immutable: 
> http://code.google.com/apis/protocolbuffers/docs/reference/java-generated.html#message
>  and this code is heavily used in production, so you can bank on that.
> 
> The only way I can see that this would be accomplished would be by returning 
> a copy of the underlying protocol buffer, wrapped in something without 
> mutators.  Copying protocol buffers is quite cheap and this wouldn't require 
> volatile or any locks to work. But I don't have access to code right here, 
> right now to check this...
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Protocol Buffers" group.
> To post to this group, send email to protobuf@googlegroups.com.
> To unsubscribe from this group, send email to 
> protobuf+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/protobuf?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to