updated BinaryObjectBuilder documentation

Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/16ffe6e2
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/16ffe6e2
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/16ffe6e2

Branch: refs/heads/ignite-1232
Commit: 16ffe6e20f80854dfb7c0c1284117f7a58cd27a7
Parents: 735cc7c
Author: Denis Magda <[email protected]>
Authored: Wed Jun 29 14:40:30 2016 +0300
Committer: Denis Magda <[email protected]>
Committed: Wed Jun 29 14:40:30 2016 +0300

----------------------------------------------------------------------
 .../org/apache/ignite/binary/BinaryObjectBuilder.java    | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/16ffe6e2/modules/core/src/main/java/org/apache/ignite/binary/BinaryObjectBuilder.java
----------------------------------------------------------------------
diff --git 
a/modules/core/src/main/java/org/apache/ignite/binary/BinaryObjectBuilder.java 
b/modules/core/src/main/java/org/apache/ignite/binary/BinaryObjectBuilder.java
index 156ddb9..21f1c37 100644
--- 
a/modules/core/src/main/java/org/apache/ignite/binary/BinaryObjectBuilder.java
+++ 
b/modules/core/src/main/java/org/apache/ignite/binary/BinaryObjectBuilder.java
@@ -60,6 +60,17 @@ import org.jetbrains.annotations.Nullable;
  * String city = personBinaryObj.getField("address").getField("city");
  * </pre>
  *
+ * <p>
+ * Make sure to set values for all the fields that an object from your domain 
model has.
+ * If you need to set null as a value use {@link #setField(String, Object, 
Class)} method directly specifying
+ * field's type.
+ * <p>
+ * If to follow this recommendation you'll reduce the size of internal 
metadata object that
+ * every binary object of a particular type has. Usually the metadata size 
grows because particular fields are not set
+ * to an instance of a binary object constructed with the builder. Every time 
when you construct an object
+ * setting only a subset of the fields the metadata object related to this 
type is expanded by the metadata
+ * processor which treats every new combination of the fields as the new 
version of the binary object.
+ *
  * @see org.apache.ignite.IgniteBinary#builder(String)
  * @see org.apache.ignite.IgniteBinary#builder(BinaryObject)
  */

Reply via email to