blob: b938a1e16101676ecf5652a0683fc109b6b7d6b3 [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>
<!-- Generated by javadoc -->
<title>Instantiator (Apache Geode 1.15.1)</title>
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Instantiator (Apache Geode 1.15.1)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":6,"i5":9,"i6":41,"i7":10,"i8":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<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="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>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/apache/geode/IncompatibleSystemException.html" title="class in org.apache.geode"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../org/apache/geode/InternalGemFireError.html" title="class in org.apache.geode"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/apache/geode/Instantiator.html" target="_top">Frames</a></li>
<li><a href="Instantiator.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;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><a href="#constructor.summary">Constr</a>&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><a href="#constructor.detail">Constr</a>&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.geode</div>
<h2 title="Class Instantiator" class="title">Class Instantiator</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.geode.Instantiator</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../org/apache/geode/CanonicalInstantiator.html" title="class in org.apache.geode">CanonicalInstantiator</a></dd>
</dl>
<hr>
<br>
<pre>public abstract class <span class="typeNameLabel">Instantiator</span>
extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre>
<div class="block"><code>Instantiator</code> allows classes that implement <a href="../../../org/apache/geode/DataSerializable.html" title="interface in org.apache.geode"><code>DataSerializable</code></a> to be registered with
the data serialization framework. Knowledge of <code>DataSerializable</code> classes allows the
framework to optimize how instances of those classes are data serialized.
<P>
Ordinarily, when a <code>DataSerializable</code> object is written using
<a href="../../../org/apache/geode/DataSerializer.html#writeObject-java.lang.Object-java.io.DataOutput-"><code>DataSerializer.writeObject(Object, java.io.DataOutput)</code></a>, a special marker class id is
written to the stream followed by the class name of the <code>DataSerializable</code> object. After
the marker class id is read by <a href="../../../org/apache/geode/DataSerializer.html#readObject-java.io.DataInput-"><code>DataSerializer.readObject(java.io.DataInput)</code></a> it performs the following
operations,
<OL>
<LI>The class name is read</LI>
<LI>The class is loaded using <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true#forName-java.lang.String-" title="class or interface in java.lang"><code>Class.forName(java.lang.String)</code></a></LI>
<LI>An instance of the class is created using reflection</LI>
<LI><a href="../../../org/apache/geode/DataSerializable.html#fromData-java.io.DataInput-"><code>DataSerializable.fromData(java.io.DataInput)</code></a> is invoked on the newly-created object</LI>
</OL>
However, if a <code>DataSerializable</code> class is <a href="../../../org/apache/geode/Instantiator.html#register-org.apache.geode.Instantiator-">registered</a>
with the data serialization framework and assigned a unique class id, an important optimization
can be performed that avoid the expense of using reflection to instantiate the
<code>DataSerializable</code> class. When the object is written using
<a href="../../../org/apache/geode/DataSerializer.html#writeObject-java.lang.Object-java.io.DataOutput-"><code>DataSerializer.writeObject(Object, java.io.DataOutput)</code></a>, the object's registered class id
is written to the stream. Consequently, when the data is read from the stream, the
<a href="../../../org/apache/geode/Instantiator.html#newInstance--"><code>newInstance()</code></a> method of the appropriate <code>Instantiator</code> instance is invoked to create
an "empty" instance of the <code>DataSerializable</code> instead of using reflection to create the new
instance.
<P>
Commonly, a <code>DataSerializable</code> class will register itself with the <code>Instantiator</code> in
a static initializer as shown in the below example code.
<PRE>
public class User implements DataSerializable {
private String name;
private int userId;
static {
Instantiator.register(new Instantiator(User.class, 45) {
public DataSerializable newInstance() {
return new User();
}
});
}
public User(String name, int userId) {
this.name = name;
this.userId = userId;
}
&#47;**
Creates an "empty" User whose contents are filled in by
invoking its toData() method
&#47;
private User() {
}
public void toData(DataOutput out) throws IOException {
out.writeUTF(this.name);
out.writeInt(this.userId);
}
public void fromData(DataInput in)
throws IOException, ClassNotFoundException {
this.name = in.readUTF();
this.userId = in.readInt();
}
}
</PRE>
<code>Instantiator</code>s may be distributed to other members of the distributed system when they are
registered. Consider the following scenario in which VM1 and VM2 are members of the same
distributed system. Both VMs define the sameRegion and VM2's region replicates the contents of
VM1's using replication. VM1 puts an instance of the above <code>User</code> class into the region.
The act of instantiating <code>User</code> will load the <code>User</code> class and invoke its static
initializer, thus registering the <code>Instantiator</code> with the data serialization framework.
Because the region is a replicate, the <code>User</code> will be data serialized and sent to VM2.
However, when VM2 attempts to data deserialize the <code>User</code>, its <code>Instantiator</code> will
not necessarily be registered because <code>User</code>'s static initializer may not have been invoked
yet. As a result, an exception would be logged while deserializing the <code>User</code> and the
replicate would not appear to have the new value. So, in order to ensure that the
<code>Instantiator</code> is registered in VM2, the data serialization framework distributes a message
to each member when an <code>Instantiator</code> is <a href="../../../org/apache/geode/Instantiator.html#register-org.apache.geode.Instantiator-">registered</a>.
<p>
Note that the framework does not require that an <code>Instantiator</code> be
<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io"><code>Serializable</code></a>, but it does require that it provide a
<a href="../../../org/apache/geode/Instantiator.html#Instantiator-java.lang.Class-int-">two-argument constructor</a>.</div>
<dl>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>GemFire 3.5</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../org/apache/geode/Instantiator.html#register-org.apache.geode.Instantiator-"><code>register(Instantiator)</code></a>,
<a href="../../../org/apache/geode/Instantiator.html#newInstance--"><code>newInstance()</code></a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../org/apache/geode/Instantiator.html#Instantiator-java.lang.Class-int-">Instantiator</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../org/apache/geode/DataSerializable.html" title="interface in org.apache.geode">DataSerializable</a>&gt;&nbsp;c,
int&nbsp;classId)</code>
<div class="block">Creates a new <code>Instantiator</code> that instantiates a given class.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/geode/Instantiator.html#getContext--">getContext</a></span>()</code>
<div class="block">Returns the context of this <code>Instantiator</code>.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/geode/Instantiator.html#getEventId--">getEventId</a></span>()</code>
<div class="block">Returns the unique <code>eventId</code> of this <code>Instantiator</code>.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/geode/Instantiator.html#getId--">getId</a></span>()</code>
<div class="block">Returns the unique <code>id</code> of this <code>Instantiator</code>.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../org/apache/geode/DataSerializable.html" title="interface in org.apache.geode">DataSerializable</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/geode/Instantiator.html#getInstantiatedClass--">getInstantiatedClass</a></span>()</code>
<div class="block">Returns the <code>DataSerializable</code> class that is instantiated by this <code>Instantiator</code>.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>abstract <a href="../../../org/apache/geode/DataSerializable.html" title="interface in org.apache.geode">DataSerializable</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/geode/Instantiator.html#newInstance--">newInstance</a></span>()</code>
<div class="block">Creates a new "empty" instance of a <code>DataSerializable</code> class whose state will be filled
in by invoking its <a href="../../../org/apache/geode/DataSerializable.html#fromData-java.io.DataInput-"><code>fromData</code></a> method.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/geode/Instantiator.html#register-org.apache.geode.Instantiator-">register</a></span>(<a href="../../../org/apache/geode/Instantiator.html" title="class in org.apache.geode">Instantiator</a>&nbsp;instantiator)</code>
<div class="block">Registers a <code>DataSerializable</code> class with the data serialization framework.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/geode/Instantiator.html#register-org.apache.geode.Instantiator-boolean-">register</a></span>(<a href="../../../org/apache/geode/Instantiator.html" title="class in org.apache.geode">Instantiator</a>&nbsp;instantiator,
boolean&nbsp;distribute)</code>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
<div class="block"><span class="deprecationComment">as of 9.0 use <a href="../../../org/apache/geode/Instantiator.html#register-org.apache.geode.Instantiator-"><code>register(Instantiator)</code></a> instead</span></div>
</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/geode/Instantiator.html#setContext-java.lang.Object-">setContext</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;context)</code>
<div class="block">sets the context of this <code>Instantiator</code>.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/geode/Instantiator.html#setEventId-java.lang.Object-">setEventId</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;eventId)</code>
<div class="block">sets the unique <code>eventId</code> of this <code>Instantiator</code>.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Instantiator-java.lang.Class-int-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Instantiator</h4>
<pre>public&nbsp;Instantiator(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../org/apache/geode/DataSerializable.html" title="interface in org.apache.geode">DataSerializable</a>&gt;&nbsp;c,
int&nbsp;classId)</pre>
<div class="block">Creates a new <code>Instantiator</code> that instantiates a given class.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>c</code> - The <code>DataSerializable</code> class to register. This class must have a static
initializer that registers this <code>Instantiator</code>.</dd>
<dd><code>classId</code> - A unique id for class <code>c</code>. The <code>classId</code> must not be zero. This has
been an <code>int</code> since dsPhase1.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - If <code>c</code> does not implement <code>DataSerializable</code>,
<code>classId</code> is less than or equal to zero.</dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - If <code>c</code> is <code>null</code></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="register-org.apache.geode.Instantiator-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>register</h4>
<pre>public static&nbsp;void&nbsp;register(<a href="../../../org/apache/geode/Instantiator.html" title="class in org.apache.geode">Instantiator</a>&nbsp;instantiator)</pre>
<div class="block">Registers a <code>DataSerializable</code> class with the data serialization framework. This method
is usually invoked from the static initializer of a class that implements
<code>DataSerializable</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>instantiator</code> - An <code>Instantiator</code> whose <a href="../../../org/apache/geode/Instantiator.html#newInstance--"><code>newInstance()</code></a> method is invoked when
an object is data deserialized.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html?is-external=true" title="class or interface in java.lang">IllegalStateException</a></code> - If class <code>c</code> is already registered with a different class
id, or another class has already been registered with id <code>classId</code></dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - If <code>instantiator</code> is <code>null</code>.</dd>
</dl>
</li>
</ul>
<a name="register-org.apache.geode.Instantiator-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>register</h4>
<pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" title="class or interface in java.lang">@Deprecated</a>
public static&nbsp;void&nbsp;register(<a href="../../../org/apache/geode/Instantiator.html" title="class in org.apache.geode">Instantiator</a>&nbsp;instantiator,
boolean&nbsp;distribute)</pre>
<div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">as of 9.0 use <a href="../../../org/apache/geode/Instantiator.html#register-org.apache.geode.Instantiator-"><code>register(Instantiator)</code></a> instead</span></div>
<div class="block">Registers a <code>DataSerializable</code> class with the data serialization framework. This method
is usually invoked from the static initializer of a class that implements
<code>DataSerializable</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>instantiator</code> - An <code>Instantiator</code> whose <a href="../../../org/apache/geode/Instantiator.html#newInstance--"><code>newInstance()</code></a> method is invoked when
an object is data deserialized.</dd>
<dd><code>distribute</code> - True if the registered <code>Instantiator</code> has to be distributed to other
members of the distributed system. Note that if distribute is set to false it may still
be distributed in some cases.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - If class <code>c</code> is already registered with a different
class id, or another class has already been registered with id <code>classId</code></dd>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - If <code>instantiator</code> is <code>null</code>.</dd>
</dl>
</li>
</ul>
<a name="newInstance--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>newInstance</h4>
<pre>public abstract&nbsp;<a href="../../../org/apache/geode/DataSerializable.html" title="interface in org.apache.geode">DataSerializable</a>&nbsp;newInstance()</pre>
<div class="block">Creates a new "empty" instance of a <code>DataSerializable</code> class whose state will be filled
in by invoking its <a href="../../../org/apache/geode/DataSerializable.html#fromData-java.io.DataInput-"><code>fromData</code></a> method.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a new "empty" instance of a <code>DataSerializable</code> class</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../org/apache/geode/DataSerializer.html#readObject-java.io.DataInput-"><code>DataSerializer.readObject(java.io.DataInput)</code></a></dd>
</dl>
</li>
</ul>
<a name="getInstantiatedClass--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getInstantiatedClass</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a>&lt;? extends <a href="../../../org/apache/geode/DataSerializable.html" title="interface in org.apache.geode">DataSerializable</a>&gt;&nbsp;getInstantiatedClass()</pre>
<div class="block">Returns the <code>DataSerializable</code> class that is instantiated by this <code>Instantiator</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the <code>DataSerializable</code> class that is instantiated by this <code>Instantiator</code></dd>
</dl>
</li>
</ul>
<a name="getId--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getId</h4>
<pre>public&nbsp;int&nbsp;getId()</pre>
<div class="block">Returns the unique <code>id</code> of this <code>Instantiator</code>.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the unique <code>id</code> of this <code>Instantiator</code></dd>
</dl>
</li>
</ul>
<a name="setEventId-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setEventId</h4>
<pre>public&nbsp;void&nbsp;setEventId(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;eventId)</pre>
<div class="block">sets the unique <code>eventId</code> of this <code>Instantiator</code>. For internal use only.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>eventId</code> - the unique <code>eventId</code> of this <code>Instantiator</code></dd>
</dl>
</li>
</ul>
<a name="getEventId--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEventId</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;getEventId()</pre>
<div class="block">Returns the unique <code>eventId</code> of this <code>Instantiator</code>. For internal use only.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the unique <code>eventId</code> of this <code>Instantiator</code></dd>
</dl>
</li>
</ul>
<a name="setContext-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setContext</h4>
<pre>public&nbsp;void&nbsp;setContext(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;context)</pre>
<div class="block">sets the context of this <code>Instantiator</code>. For internal use only.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>context</code> - the context of this <code>Instantiator</code></dd>
</dl>
</li>
</ul>
<a name="getContext--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getContext</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>&nbsp;getContext()</pre>
<div class="block">Returns the context of this <code>Instantiator</code>. For internal use only.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the context of this <code>Instantiator</code></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>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<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="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>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/apache/geode/IncompatibleSystemException.html" title="class in org.apache.geode"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../org/apache/geode/InternalGemFireError.html" title="class in org.apache.geode"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/apache/geode/Instantiator.html" target="_top">Frames</a></li>
<li><a href="Instantiator.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All&nbsp;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><a href="#constructor.summary">Constr</a>&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><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>