blob: 45bdcf700077defed1ba91303c2bc91229420765 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<META NAME="ROBOTS" CONTENT="NOINDEX">
<link rel="canonical" href="https://ignite.apache.org/releases/1.6.0/javadoc/org/apache/ignite/IgniteBinary.html" />
<!-- Generated by javadoc (version 1.7.0_80) on Wed May 18 17:03:55 MSK 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>IgniteBinary (Ignite 1.6.0)</title>
<meta name="date" content="2016-05-18">
<link rel="stylesheet" type="text/css" href="../../../javadoc.css" title="Style">
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-61232409-1', 'auto');
ga('send', 'pageview');
</script></head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="IgniteBinary (Ignite 1.6.0)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/IgniteBinary.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em>Ignite - In-Memory Data Fabric</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/apache/ignite/IgniteAuthenticationException.html" title="class in org.apache.ignite"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../org/apache/ignite/IgniteCache.html" title="interface in org.apache.ignite"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/apache/ignite/IgniteBinary.html" target="_top">Frames</a></li>
<li><a href="IgniteBinary.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.ignite</div>
<h2 title="Interface IgniteBinary" class="title">Interface IgniteBinary</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public interface <span class="strong">IgniteBinary</span></pre>
<div class="block">Defines binary objects functionality. With binary objects you are able to:
<ul>
<li>Seamlessly interoperate between Java, .NET, and C++.</li>
<li>Make any object binary with zero code change to your existing code.</li>
<li>Nest binary objects within each other.</li>
<li>Automatically handle <code>circular</code> or <code>null</code> references.</li>
<li>Automatically convert collections and maps between Java, .NET, and C++.</li>
<li>
Optionally avoid deserialization of objects on the server side
(objects are stored in <a href="../../../org/apache/ignite/binary/BinaryObject.html" title="interface in org.apache.ignite.binary"><code>BinaryObject</code></a> format).
</li>
<li>Avoid need to have concrete class definitions on the server side.</li>
<li>Dynamically change structure of the classes without having to restart the cluster.</li>
<li>Index into binary objects for querying purposes.</li>
</ul>
<h1 class="header">Working With Binaries Directly</h1>
Once an object is defined as binary,
Ignite will always store it in memory in the binary (i.e. binary) format.
User can choose to work either with the binary format or with the deserialized form
(assuming that class definitions are present in the classpath).
<p>
To work with the binary format directly, user should create a special cache projection
using IgniteCache.withKeepBinary() method and then retrieve individual fields as needed:
<pre name=code class=java>
IgniteCache&lt;BinaryObject, BinaryObject&gt; prj = cache.withKeepBinary();
// Convert instance of MyKey to binary format.
// We could also use BinaryBuilder to create the key in binary format directly.
BinaryObject key = grid.binary().toBinary(new MyKey());
BinaryObject val = prj.get(key);
String field = val.field("myFieldName");
</pre>
Alternatively, if we have class definitions in the classpath, we may choose to work with deserialized
typed objects at all times.
<pre name=code class=java>
IgniteCache&lt;MyKey.class, MyValue.class&gt; cache = grid.cache(null);
MyValue val = cache.get(new MyKey());
// Normal java getter.
String fieldVal = val.getMyFieldName();
</pre>
If we used, for example, one of the automatically handled binary types for a key, like integer,
and still wanted to work with binary binary format for values, then we would declare cache projection
as follows:
<pre name=code class=java>
IgniteCache&lt;Integer.class, BinaryObject&gt; prj = cache.withKeepBinary();
</pre>
<h1 class="header">Automatic Binary Types</h1>
Note that only binary classes are converted to <a href="../../../org/apache/ignite/binary/BinaryObject.html" title="interface in org.apache.ignite.binary"><code>BinaryObject</code></a> format. Following
classes are never converted (e.g., <a href="../../../org/apache/ignite/IgniteBinary.html#toBinary(java.lang.Object)"><code>toBinary(Object)</code></a> method will return original
object, and instances of these classes will be stored in cache without changes):
<ul>
<li>All primitives (byte, int, ...) and there boxed versions (Byte, Integer, ...)</li>
<li>Arrays of primitives (byte[], int[], ...)</li>
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang"><code>String</code></a> and array of <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang"><code>String</code></a>s</li>
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util"><code>UUID</code></a> and array of <a href="http://docs.oracle.com/javase/7/docs/api/java/util/UUID.html?is-external=true" title="class or interface in java.util"><code>UUID</code></a>s</li>
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util"><code>Date</code></a> and array of <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Date.html?is-external=true" title="class or interface in java.util"><code>Date</code></a>s</li>
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/sql/Timestamp.html?is-external=true" title="class or interface in java.sql"><code>Timestamp</code></a> and array of <a href="http://docs.oracle.com/javase/7/docs/api/java/sql/Timestamp.html?is-external=true" title="class or interface in java.sql"><code>Timestamp</code></a>s</li>
<li>Enums and array of enums</li>
<li>
Maps, collections and array of objects (but objects inside
them will still be converted if they are binary)
</li>
</ul>
<h1 class="header">Working With Maps and Collections</h1>
All maps and collections in the binary objects are serialized automatically. When working
with different platforms, e.g. C++ or .NET, Ignite will automatically pick the most
adequate collection or map in either language. For example, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/ArrayList.html?is-external=true" title="class or interface in java.util"><code>ArrayList</code></a> in Java will become
<code>List</code> in C#, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/LinkedList.html?is-external=true" title="class or interface in java.util"><code>LinkedList</code></a> in Java is <a href="http://docs.oracle.com/javase/7/docs/api/java/util/LinkedList.html?is-external=true" title="class or interface in java.util"><code>LinkedList</code></a> in C#, <a href="http://docs.oracle.com/javase/7/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util"><code>HashMap</code></a>
in Java is <code>Dictionary</code> in C#, and <a href="http://docs.oracle.com/javase/7/docs/api/java/util/TreeMap.html?is-external=true" title="class or interface in java.util"><code>TreeMap</code></a> in Java becomes <code>SortedDictionary</code>
in C#, etc.
<h1 class="header">Building Binary Objects</h1>
Ignite comes with <a href="../../../org/apache/ignite/binary/BinaryObjectBuilder.html" title="interface in org.apache.ignite.binary"><code>BinaryObjectBuilder</code></a> which allows to build binary objects dynamically:
<pre name=code class=java>
BinaryBuilder builder = Ignition.ignite().binary().builder();
builder.typeId("MyObject");
builder.stringField("fieldA", "A");
build.intField("fieldB", "B");
BinaryObject binaryObj = builder.build();
</pre>
For the cases when class definition is present
in the class path, it is also possible to populate a standard POJO and then
convert it to binary format, like so:
<pre name=code class=java>
MyObject obj = new MyObject();
obj.setFieldA("A");
obj.setFieldB(123);
BinaryObject binaryObj = Ignition.ignite().binary().toBinary(obj);
</pre>
NOTE: you don't need to convert typed objects to binary format before storing
them in cache, Ignite will do that automatically.
<h1 class="header">Binary Metadata</h1>
Even though Ignite binary protocol only works with hash codes for type and field names
to achieve better performance, Ignite provides metadata for all binary types which
can be queried ar runtime via any of the <a href="../../../org/apache/ignite/IgniteBinary.html#type(java.lang.Class)"><code>type(Class)</code></a>
methods. Having metadata also allows for proper formatting of <code>BinaryObject#toString()</code> method,
even when binary objects are kept in binary format only, which may be necessary for audit reasons.
<h1 class="header">Dynamic Structure Changes</h1>
Since objects are always cached in the binary binary format, server does not need to
be aware of the class definitions. Moreover, if class definitions are not present or not
used on the server, then clients can continuously change the structure of the binary
objects without having to restart the cluster. For example, if one client stores a
certain class with fields A and B, and another client stores the same class with
fields B and C, then the server-side binary object will have the fields A, B, and C.
As the structure of a binary object changes, the new fields become available for SQL queries
automatically.
<h1 class="header">Configuration</h1>
By default all your objects are considered as binary and no specific configuration is needed.
The only requirement Ignite imposes is that your object has an empty
constructor. Note, that since server side does not have to know the class definition,
you only need to list binary objects in configuration on the client side. However, if you
list them on the server side as well, then you get the ability to deserialize binary objects
into concrete types on the server as well as on the client.
<p>
Here is an example of binary configuration (note that star (*) notation is supported):
<pre name=code class=xml>
...
&lt;!-- Explicit binary objects configuration. --&gt;
&lt;property name="marshaller"&gt;
&lt;bean class="org.apache.ignite.marshaller.binary.BinaryMarshaller"&gt;
&lt;property name="classNames"&gt;
&lt;list&gt;
&lt;value&gt;my.package.for.binary.objects.*&lt;/value&gt;
&lt;value&gt;org.apache.ignite.examples.client.binary.Employee&lt;/value&gt;
&lt;/list&gt;
&lt;/property&gt;
&lt;/bean&gt;
&lt;/property&gt;
...
</pre>
or from code:
<pre name=code class=java>
IgniteConfiguration cfg = new IgniteConfiguration();
BinaryMarshaller marsh = new BinaryMarshaller();
marsh.setClassNames(Arrays.asList(
Employee.class.getName(),
Address.class.getName())
);
cfg.setMarshaller(marsh);
</pre>
You can also specify class name for a binary object via <a href="../../../org/apache/ignite/binary/BinaryTypeConfiguration.html" title="class in org.apache.ignite.binary"><code>BinaryTypeConfiguration</code></a>.
Do it in case if you need to override other configuration properties on per-type level, like
ID-mapper, or serializer.
<h1 class="header">Custom Affinity Keys</h1>
Often you need to specify an alternate key (not the cache key) for affinity routing whenever
storing objects in cache. For example, if you are caching <code>Employee</code> object with
<code>Organization</code>, and want to colocate employees with organization they work for,
so you can process them together, you need to specify an alternate affinity key.
With binary objects you would have to do it as following:
<pre name=code class=xml>
&lt;property name="marshaller"&gt;
&lt;bean class="org.gridgain.grid.marshaller.binary.BinaryMarshaller"&gt;
...
&lt;property name="typeConfigurations"&gt;
&lt;list&gt;
&lt;bean class="org.apache.ignite.binary.BinaryTypeConfiguration"&gt;
&lt;property name="className" value="org.apache.ignite.examples.client.binary.EmployeeKey"/&gt;
&lt;property name="affinityKeyFieldName" value="organizationId"/&gt;
&lt;/bean&gt;
&lt;/list&gt;
&lt;/property&gt;
...
&lt;/bean&gt;
&lt;/property&gt;
</pre>
<h1 class="header">Serialization</h1>
Serialization and deserialization works out-of-the-box in Ignite. However, you can provide your own custom
serialization logic by optionally implementing <a href="../../../org/apache/ignite/binary/Binarylizable.html" title="interface in org.apache.ignite.binary"><code>Binarylizable</code></a> interface, like so:
<pre name=code class=java>
public class Address implements BinaryMarshalAware {
private String street;
private int zip;
// Empty constructor required for binary deserialization.
public Address() {}
&#64;Override public void writeBinary(BinaryWriter writer) throws BinaryException {
writer.writeString("street", street);
writer.writeInt("zip", zip);
}
&#64;Override public void readBinary(BinaryReader reader) throws BinaryException {
street = reader.readString("street");
zip = reader.readInt("zip");
}
}
</pre>
Alternatively, if you cannot change class definitions, you can provide custom serialization
logic in <a href="../../../org/apache/ignite/binary/BinarySerializer.html" title="interface in org.apache.ignite.binary"><code>BinarySerializer</code></a> either globally in
<a href="../../../org/apache/ignite/configuration/BinaryConfiguration.html" title="class in org.apache.ignite.configuration"><code>BinaryConfiguration</code></a> or
for a specific type via <a href="../../../org/apache/ignite/binary/BinaryTypeConfiguration.html" title="class in org.apache.ignite.binary"><code>BinaryTypeConfiguration</code></a> instance.
<p>
Similar to java serialization you can use <code>writeReplace()</code> and <code>readResolve()</code> methods.
<ul>
<li>
<code>readResolve</code> is defined as follows: <code>ANY-ACCESS-MODIFIER Object readResolve()</code>.
It may be used to replace the de-serialized object by another one of your choice.
</li>
<li>
<code>writeReplace</code> is defined as follows: <code>ANY-ACCESS-MODIFIER Object writeReplace()</code>. This method
allows the developer to provide a replacement object that will be serialized instead of the original one.
</li>
</ul>
<h1 class="header">Custom ID Mappers</h1>
Ignite implementation uses name hash codes to generate IDs for class names or field names
internally. However, in cases when you want to provide your own ID mapping schema,
you can provide your own <a href="../../../org/apache/ignite/binary/BinaryIdMapper.html" title="interface in org.apache.ignite.binary"><code>BinaryIdMapper</code></a> implementation.
<p>
ID-mapper may be provided either globally in <a href="../../../org/apache/ignite/configuration/BinaryConfiguration.html" title="class in org.apache.ignite.configuration"><code>BinaryConfiguration</code></a>,
or for a specific type via <a href="../../../org/apache/ignite/binary/BinaryTypeConfiguration.html" title="class in org.apache.ignite.binary"><code>BinaryTypeConfiguration</code></a> instance.
<h1 class="header">Query Indexing</h1>
Binary objects can be indexed for querying by specifying index fields in
<a href="../../../org/apache/ignite/cache/CacheTypeMetadata.html" title="class in org.apache.ignite.cache"><code>CacheTypeMetadata</code></a> inside of specific
<a href="../../../org/apache/ignite/configuration/CacheConfiguration.html" title="class in org.apache.ignite.configuration"><code>CacheConfiguration</code></a> instance,
like so:
<pre name=code class=xml>
...
&lt;bean class="org.apache.ignite.cache.CacheConfiguration"&gt;
...
&lt;property name="typeMetadata"&gt;
&lt;list&gt;
&lt;bean class="CacheTypeMetadata"&gt;
&lt;property name="type" value="Employee"/&gt;
&lt;!-- Fields to index in ascending order. --&gt;
&lt;property name="ascendingFields"&gt;
&lt;map&gt;
&lt;entry key="name" value="java.lang.String"/&gt;
&lt;!-- Nested binary objects can also be indexed. --&gt;
&lt;entry key="address.zip" value="java.lang.Integer"/&gt;
&lt;/map&gt;
&lt;/property&gt;
&lt;/bean&gt;
&lt;/list&gt;
&lt;/property&gt;
&lt;/bean&gt;
</pre></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../org/apache/ignite/binary/BinaryObject.html" title="interface in org.apache.ignite.binary">BinaryObject</a></code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteBinary.html#buildEnum(java.lang.String,%20int)">buildEnum</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;typeName,
int&nbsp;ord)</code>
<div class="block">Create enum object.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../org/apache/ignite/binary/BinaryObjectBuilder.html" title="interface in org.apache.ignite.binary">BinaryObjectBuilder</a></code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteBinary.html#builder(org.apache.ignite.binary.BinaryObject)">builder</a></strong>(<a href="../../../org/apache/ignite/binary/BinaryObject.html" title="interface in org.apache.ignite.binary">BinaryObject</a>&nbsp;binaryObj)</code>
<div class="block">Creates binary builder initialized by existing binary object.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../org/apache/ignite/binary/BinaryObjectBuilder.html" title="interface in org.apache.ignite.binary">BinaryObjectBuilder</a></code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteBinary.html#builder(java.lang.String)">builder</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;typeName)</code>
<div class="block">Creates new binary builder.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;T</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteBinary.html#toBinary(java.lang.Object)">toBinary</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;obj)</code>
<div class="block">Converts provided object to instance of <a href="../../../org/apache/ignite/binary/BinaryObject.html" title="interface in org.apache.ignite.binary"><code>BinaryObject</code></a>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../org/apache/ignite/binary/BinaryType.html" title="interface in org.apache.ignite.binary">BinaryType</a></code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteBinary.html#type(java.lang.Class)">type</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;cls)</code>
<div class="block">Gets metadata for provided class.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../org/apache/ignite/binary/BinaryType.html" title="interface in org.apache.ignite.binary">BinaryType</a></code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteBinary.html#type(int)">type</a></strong>(int&nbsp;typeId)</code>
<div class="block">Gets metadata for provided type ID.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../org/apache/ignite/binary/BinaryType.html" title="interface in org.apache.ignite.binary">BinaryType</a></code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteBinary.html#type(java.lang.String)">type</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;typeName)</code>
<div class="block">Gets metadata for provided class name.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteBinary.html#typeId(java.lang.String)">typeId</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;typeName)</code>
<div class="block">Gets type ID for given type name.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../org/apache/ignite/binary/BinaryType.html" title="interface in org.apache.ignite.binary">BinaryType</a>&gt;</code></td>
<td class="colLast"><code><strong><a href="../../../org/apache/ignite/IgniteBinary.html#types()">types</a></strong>()</code>
<div class="block">Gets metadata for all known types.</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="typeId(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>typeId</h4>
<pre>int&nbsp;typeId(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;typeName)</pre>
<div class="block">Gets type ID for given type name.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>typeName</code> - Type name.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Type ID.</dd></dl>
</li>
</ul>
<a name="toBinary(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toBinary</h4>
<pre>&lt;T&gt;&nbsp;T&nbsp;toBinary(@Nullable
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;obj)
throws <a href="../../../org/apache/ignite/binary/BinaryObjectException.html" title="class in org.apache.ignite.binary">BinaryObjectException</a></pre>
<div class="block">Converts provided object to instance of <a href="../../../org/apache/ignite/binary/BinaryObject.html" title="interface in org.apache.ignite.binary"><code>BinaryObject</code></a>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>obj</code> - Object to convert.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Converted object.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/binary/BinaryObjectException.html" title="class in org.apache.ignite.binary">BinaryObjectException</a></code> - In case of error.</dd></dl>
</li>
</ul>
<a name="builder(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>builder</h4>
<pre><a href="../../../org/apache/ignite/binary/BinaryObjectBuilder.html" title="interface in org.apache.ignite.binary">BinaryObjectBuilder</a>&nbsp;builder(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;typeName)
throws <a href="../../../org/apache/ignite/binary/BinaryObjectException.html" title="class in org.apache.ignite.binary">BinaryObjectException</a></pre>
<div class="block">Creates new binary builder.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>typeName</code> - Type name.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Newly binary builder.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/binary/BinaryObjectException.html" title="class in org.apache.ignite.binary">BinaryObjectException</a></code></dd></dl>
</li>
</ul>
<a name="builder(org.apache.ignite.binary.BinaryObject)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>builder</h4>
<pre><a href="../../../org/apache/ignite/binary/BinaryObjectBuilder.html" title="interface in org.apache.ignite.binary">BinaryObjectBuilder</a>&nbsp;builder(<a href="../../../org/apache/ignite/binary/BinaryObject.html" title="interface in org.apache.ignite.binary">BinaryObject</a>&nbsp;binaryObj)
throws <a href="../../../org/apache/ignite/binary/BinaryObjectException.html" title="class in org.apache.ignite.binary">BinaryObjectException</a></pre>
<div class="block">Creates binary builder initialized by existing binary object.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>binaryObj</code> - Binary object to initialize builder.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Binary builder.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/binary/BinaryObjectException.html" title="class in org.apache.ignite.binary">BinaryObjectException</a></code></dd></dl>
</li>
</ul>
<a name="type(java.lang.Class)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>type</h4>
<pre><a href="../../../org/apache/ignite/binary/BinaryType.html" title="interface in org.apache.ignite.binary">BinaryType</a>&nbsp;type(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;?&gt;&nbsp;cls)
throws <a href="../../../org/apache/ignite/binary/BinaryObjectException.html" title="class in org.apache.ignite.binary">BinaryObjectException</a></pre>
<div class="block">Gets metadata for provided class.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>cls</code> - Class.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Metadata.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/binary/BinaryObjectException.html" title="class in org.apache.ignite.binary">BinaryObjectException</a></code> - In case of error.</dd></dl>
</li>
</ul>
<a name="type(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>type</h4>
<pre><a href="../../../org/apache/ignite/binary/BinaryType.html" title="interface in org.apache.ignite.binary">BinaryType</a>&nbsp;type(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;typeName)
throws <a href="../../../org/apache/ignite/binary/BinaryObjectException.html" title="class in org.apache.ignite.binary">BinaryObjectException</a></pre>
<div class="block">Gets metadata for provided class name.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>typeName</code> - Type name.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Metadata.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/binary/BinaryObjectException.html" title="class in org.apache.ignite.binary">BinaryObjectException</a></code> - In case of error.</dd></dl>
</li>
</ul>
<a name="type(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>type</h4>
<pre><a href="../../../org/apache/ignite/binary/BinaryType.html" title="interface in org.apache.ignite.binary">BinaryType</a>&nbsp;type(int&nbsp;typeId)
throws <a href="../../../org/apache/ignite/binary/BinaryObjectException.html" title="class in org.apache.ignite.binary">BinaryObjectException</a></pre>
<div class="block">Gets metadata for provided type ID.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>typeId</code> - Type ID.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Metadata.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/binary/BinaryObjectException.html" title="class in org.apache.ignite.binary">BinaryObjectException</a></code> - In case of error.</dd></dl>
</li>
</ul>
<a name="types()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>types</h4>
<pre><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Collection.html?is-external=true" title="class or interface in java.util">Collection</a>&lt;<a href="../../../org/apache/ignite/binary/BinaryType.html" title="interface in org.apache.ignite.binary">BinaryType</a>&gt;&nbsp;types()
throws <a href="../../../org/apache/ignite/binary/BinaryObjectException.html" title="class in org.apache.ignite.binary">BinaryObjectException</a></pre>
<div class="block">Gets metadata for all known types.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Metadata.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="../../../org/apache/ignite/binary/BinaryObjectException.html" title="class in org.apache.ignite.binary">BinaryObjectException</a></code> - In case of error.</dd></dl>
</li>
</ul>
<a name="buildEnum(java.lang.String, int)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>buildEnum</h4>
<pre><a href="../../../org/apache/ignite/binary/BinaryObject.html" title="interface in org.apache.ignite.binary">BinaryObject</a>&nbsp;buildEnum(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;typeName,
int&nbsp;ord)</pre>
<div class="block">Create enum object.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>typeName</code> - Type name.</dd><dd><code>ord</code> - Ordinal.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Enum object.</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/IgniteBinary.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em>Ignite - In-Memory Data Fabric</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/apache/ignite/IgniteAuthenticationException.html" title="class in org.apache.ignite"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../org/apache/ignite/IgniteCache.html" title="interface in org.apache.ignite"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/apache/ignite/IgniteBinary.html" target="_top">Frames</a></li>
<li><a href="IgniteBinary.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><table width="100%" border="0" cellspacing=0 cellpadding=0 style="padding: 5px"> <tr> <td> <table style="padding-left: 0; margin: 0"> <tbody style="padding: 0; margin: 0"> <tr style="padding: 0; margin: 0"> <td> <a target=_blank href="https://ignite.apache.org"><nobr>2015 Copyright &#169; Apache Software Foundation</nobr></a> </td> </tr> </tbody> </table> </td> <td width="100%" align="right" valign="center"> <a href="https://twitter.com/ApacheIgnite" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @ApacheIgnite</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script> </td> </tr> <tr> <td colspan="2" valign="top" align="left"> <table style="padding-left: 0; margin: 0"> <tbody style="padding: 0; margin: 0"> <tr style="padding: 0; margin: 0"> <td> <b>Ignite Fabric</b> </td> <td>:&nbsp;&nbsp; ver. <strong>1.6.0</strong> </td> </tr> <tr style="padding: 0; margin: 0"> <td> <b>Release Date</b> </td> <td>:&nbsp;&nbsp; May 18 2016 </td> </tr> </tbody> </table> </td> </tr> </table></small></p>
</body>
</html>