blob: e075733308afb448686cdd360d65d6d29442866d [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 (1.8.0_222) on Tue Dec 08 12:28:31 UTC 2020 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>DiscoveryManager (EclipseLink 3.0.0, API Reference)</title>
<meta name="date" content="2020-12-08">
<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="DiscoveryManager (EclipseLink 3.0.0, API Reference)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete 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 class="aboutLanguage">EclipseLink 3.0.0, API Reference</div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/eclipse/persistence/sessions/coordination/CommandProcessor.html" title="interface in org.eclipse.persistence.sessions.coordination"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/eclipse/persistence/sessions/coordination/MergeChangeSetCommand.html" title="class in org.eclipse.persistence.sessions.coordination"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/eclipse/persistence/sessions/coordination/DiscoveryManager.html" target="_top">Frames</a></li>
<li><a href="DiscoveryManager.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><a href="#field.summary">Field</a>&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><a href="#field.detail">Field</a>&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.eclipse.persistence.sessions.coordination</div>
<h2 title="Class DiscoveryManager" class="title">Class DiscoveryManager</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.eclipse.persistence.sessions.coordination.DiscoveryManager</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a></dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">DiscoveryManager</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>
implements <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a></pre>
<div class="block"><p>
<b>Purpose</b>: Detects new members of a logical EclipseLink cluster.
<p>
<b>Description</b>: Each RemoteCommandManager has its own DiscoveryManager,
which handles the detection of other remote command services as they become available.
The DiscoveryManager is an active object (in that it extends Thread) and becomes
a separate thread when it is started using startDiscovery().
<p>
Discovery is done through the use of a multicast. Each discovery manager
joins the multicast group and announces itself to the group. As it receives
service announcements from other discovery managers it notifies the RCM to
establish connections to and from the new service.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../org/eclipse/persistence/sessions/coordination/RemoteCommandManager.html" title="class in org.eclipse.persistence.sessions.coordination"><code>RemoteCommandManager</code></a>,
<a href="https://docs.oracle.com/javase/8/docs/api/java/net/MulticastSocket.html?is-external=true" title="class or interface in java.net"><code>MulticastSocket</code></a></dd>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Steven Vo</dd>
<dt><span class="simpleTagLabel">Since:</span></dt>
<dd>OracleAS TopLink 10<i>g</i> (9.0.4)</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#announcementDelay">announcementDelay</a></span></code>
<div class="block">Delay time in millis between initialization and when the announcement is sent</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/net/MulticastSocket.html?is-external=true" title="class or interface in java.net">MulticastSocket</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#communicationSocket">communicationSocket</a></span></code>
<div class="block">The multicast socket used for discovery</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#DEFAULT_ANNOUNCEMENT_DELAY">DEFAULT_ANNOUNCEMENT_DELAY</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#DEFAULT_MULTICAST_GROUP">DEFAULT_MULTICAST_GROUP</a></span></code>
<div class="block">Default value constants</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#DEFAULT_MULTICAST_PORT">DEFAULT_MULTICAST_PORT</a></span></code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#DEFAULT_PACKET_TIME_TO_LIVE">DEFAULT_PACKET_TIME_TO_LIVE</a></span></code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#multicastGroupAddress">multicastGroupAddress</a></span></code>
<div class="block">Defines the IP address of the multicast group</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#multicastPort">multicastPort</a></span></code>
<div class="block">Defines the port the multicast socket will be using</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#packetTimeToLive">packetTimeToLive</a></span></code>
<div class="block">Number of hops in the life of the datapacket
Default is 2, a hub and an interface card to prevent the data packets from leaving the localnetwork.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>protected <a href="../../../../../org/eclipse/persistence/sessions/coordination/RemoteCommandManager.html" title="class in org.eclipse.persistence.sessions.coordination">RemoteCommandManager</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#rcm">rcm</a></span></code>
<div class="block">The remote command manager responsible for this service</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>protected boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#stopListening">stopListening</a></span></code>
<div class="block">Indicates to the listening thread that it should stop</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ======== 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/eclipse/persistence/sessions/coordination/DiscoveryManager.html#DiscoveryManager-org.eclipse.persistence.sessions.coordination.RemoteCommandManager-">DiscoveryManager</a></span>(<a href="../../../../../org/eclipse/persistence/sessions/coordination/RemoteCommandManager.html" title="class in org.eclipse.persistence.sessions.coordination">RemoteCommandManager</a>&nbsp;mgr)</code>
<div class="block">Constructors to create a discovery manager.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#DiscoveryManager-java.lang.String-int-int-org.eclipse.persistence.sessions.coordination.RemoteCommandManager-">DiscoveryManager</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;address,
int&nbsp;port,
int&nbsp;delay,
<a href="../../../../../org/eclipse/persistence/sessions/coordination/RemoteCommandManager.html" title="class in org.eclipse.persistence.sessions.coordination">RemoteCommandManager</a>&nbsp;mgr)</code>&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#DiscoveryManager-java.lang.String-int-org.eclipse.persistence.sessions.coordination.RemoteCommandManager-">DiscoveryManager</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;address,
int&nbsp;port,
<a href="../../../../../org/eclipse/persistence/sessions/coordination/RemoteCommandManager.html" title="class in org.eclipse.persistence.sessions.coordination">RemoteCommandManager</a>&nbsp;mgr)</code>&nbsp;</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="t2" class="tableTab"><span><a href="javascript:show(2);">Instance 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></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>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#announceSession--">announceSession</a></span>()</code>
<div class="block">INTERNAL:
Send out an announcement that we are here.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#createCommunicationSocket--">createCommunicationSocket</a></span>()</code>
<div class="block">INTERNAL:
Create the multicast socket and join the multicast group.</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/eclipse/persistence/sessions/coordination/DiscoveryManager.html#getAnnouncementDelay--">getAnnouncementDelay</a></span>()</code>
<div class="block">PUBLIC:
Return the amount of time in millis that the service should wait between the time
that this Remote Service is available and a session announcement is sent out
to other discovery managers.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/net/MulticastSocket.html?is-external=true" title="class or interface in java.net">MulticastSocket</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#getCommunicationSocket--">getCommunicationSocket</a></span>()</code>
<div class="block">INTERNAL:
Return the socket that will be used for the multicast.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#getMulticastGroupAddress--">getMulticastGroupAddress</a></span>()</code>
<div class="block">PUBLIC:
Return the host address of the multicast group.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#getMulticastPort--">getMulticastPort</a></span>()</code>
<div class="block">PUBLIC:
Return the multicast port used for discovery.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#getPacketTimeToLive--">getPacketTimeToLive</a></span>()</code>
<div class="block">PUBLIC:
Returns the number of hops the data packets of the session announcement will take before expiring.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#isDiscoveryStopped--">isDiscoveryStopped</a></span>()</code>
<div class="block">ADVANCED:
Return true if discovery has been stopped at the time this method is called.</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/eclipse/persistence/sessions/coordination/DiscoveryManager.html#receivedAnnouncement-org.eclipse.persistence.sessions.coordination.ServiceId-">receivedAnnouncement</a></span>(<a href="../../../../../org/eclipse/persistence/sessions/coordination/ServiceId.html" title="class in org.eclipse.persistence.sessions.coordination">ServiceId</a>&nbsp;serviceId)</code>
<div class="block">INTERNAL:
Process the announcement that indicates that a new service is online</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#run--">run</a></span>()</code>
<div class="block">INTERNAL:
This is the main execution method of discovery.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#setAnnouncementDelay-int-">setAnnouncementDelay</a></span>(int&nbsp;millisecondsToDelay)</code>
<div class="block">PUBLIC:
Set the amount of time in millis that the service should wait between the time
that this Remote Service is available and a session announcement is sent out
to other discovery managers.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#setMulticastGroupAddress-java.lang.String-">setMulticastGroupAddress</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;address)</code>
<div class="block">PUBLIC:
Set the host address of the multicast group.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#setMulticastPort-int-">setMulticastPort</a></span>(int&nbsp;port)</code>
<div class="block">PUBLIC:
Set the multicast port used for discovery.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#setPacketTimeToLive-int-">setPacketTimeToLive</a></span>(int&nbsp;newPacketTimeToLive)</code>
<div class="block">PUBLIC:
Set the number of hops the data packets of the session announcement will take before expiring.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>protected void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#shallowCopy-org.eclipse.persistence.sessions.coordination.DiscoveryManager-">shallowCopy</a></span>(<a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html" title="class in org.eclipse.persistence.sessions.coordination">DiscoveryManager</a>&nbsp;dmgr)</code>
<div class="block">INTERNAL: invoke when the RCM shutdown.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#startDiscovery--">startDiscovery</a></span>()</code>
<div class="block">ADVANCED:
Announce the local service and join the cluster</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#startListening--">startListening</a></span>()</code>
<div class="block">INTERNAL:
This method puts us into the listening mode loop.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#stopDiscovery--">stopDiscovery</a></span>()</code>
<div class="block">ADVANCED:
Stop accepting announcements from other services becoming available.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html#stopListening--">stopListening</a></span>()</code>
<div class="block">INTERNAL:
Signal this instance to stop listening.</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">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="DEFAULT_MULTICAST_GROUP">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_MULTICAST_GROUP</h4>
<pre>public static final&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> DEFAULT_MULTICAST_GROUP</pre>
<div class="block">Default value constants</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.eclipse.persistence.sessions.coordination.DiscoveryManager.DEFAULT_MULTICAST_GROUP">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_MULTICAST_PORT">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_MULTICAST_PORT</h4>
<pre>public static final&nbsp;int DEFAULT_MULTICAST_PORT</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.eclipse.persistence.sessions.coordination.DiscoveryManager.DEFAULT_MULTICAST_PORT">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_PACKET_TIME_TO_LIVE">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_PACKET_TIME_TO_LIVE</h4>
<pre>public static final&nbsp;int DEFAULT_PACKET_TIME_TO_LIVE</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.eclipse.persistence.sessions.coordination.DiscoveryManager.DEFAULT_PACKET_TIME_TO_LIVE">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="DEFAULT_ANNOUNCEMENT_DELAY">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_ANNOUNCEMENT_DELAY</h4>
<pre>public static final&nbsp;int DEFAULT_ANNOUNCEMENT_DELAY</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../constant-values.html#org.eclipse.persistence.sessions.coordination.DiscoveryManager.DEFAULT_ANNOUNCEMENT_DELAY">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a name="multicastGroupAddress">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>multicastGroupAddress</h4>
<pre>protected&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> multicastGroupAddress</pre>
<div class="block">Defines the IP address of the multicast group</div>
</li>
</ul>
<a name="multicastPort">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>multicastPort</h4>
<pre>protected&nbsp;int multicastPort</pre>
<div class="block">Defines the port the multicast socket will be using</div>
</li>
</ul>
<a name="communicationSocket">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>communicationSocket</h4>
<pre>protected&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/net/MulticastSocket.html?is-external=true" title="class or interface in java.net">MulticastSocket</a> communicationSocket</pre>
<div class="block">The multicast socket used for discovery</div>
</li>
</ul>
<a name="packetTimeToLive">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>packetTimeToLive</h4>
<pre>protected&nbsp;int packetTimeToLive</pre>
<div class="block">Number of hops in the life of the datapacket
Default is 2, a hub and an interface card to prevent the data packets from leaving the localnetwork.</div>
</li>
</ul>
<a name="stopListening">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stopListening</h4>
<pre>protected&nbsp;boolean stopListening</pre>
<div class="block">Indicates to the listening thread that it should stop</div>
</li>
</ul>
<a name="announcementDelay">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>announcementDelay</h4>
<pre>protected&nbsp;int announcementDelay</pre>
<div class="block">Delay time in millis between initialization and when the announcement is sent</div>
</li>
</ul>
<a name="rcm">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>rcm</h4>
<pre>protected&nbsp;<a href="../../../../../org/eclipse/persistence/sessions/coordination/RemoteCommandManager.html" title="class in org.eclipse.persistence.sessions.coordination">RemoteCommandManager</a> rcm</pre>
<div class="block">The remote command manager responsible for this service</div>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="DiscoveryManager-org.eclipse.persistence.sessions.coordination.RemoteCommandManager-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DiscoveryManager</h4>
<pre>public&nbsp;DiscoveryManager(<a href="../../../../../org/eclipse/persistence/sessions/coordination/RemoteCommandManager.html" title="class in org.eclipse.persistence.sessions.coordination">RemoteCommandManager</a>&nbsp;mgr)</pre>
<div class="block">Constructors to create a discovery manager.</div>
</li>
</ul>
<a name="DiscoveryManager-java.lang.String-int-org.eclipse.persistence.sessions.coordination.RemoteCommandManager-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DiscoveryManager</h4>
<pre>public&nbsp;DiscoveryManager(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;address,
int&nbsp;port,
<a href="../../../../../org/eclipse/persistence/sessions/coordination/RemoteCommandManager.html" title="class in org.eclipse.persistence.sessions.coordination">RemoteCommandManager</a>&nbsp;mgr)</pre>
</li>
</ul>
<a name="DiscoveryManager-java.lang.String-int-int-org.eclipse.persistence.sessions.coordination.RemoteCommandManager-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>DiscoveryManager</h4>
<pre>public&nbsp;DiscoveryManager(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;address,
int&nbsp;port,
int&nbsp;delay,
<a href="../../../../../org/eclipse/persistence/sessions/coordination/RemoteCommandManager.html" title="class in org.eclipse.persistence.sessions.coordination">RemoteCommandManager</a>&nbsp;mgr)</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="announceSession--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>announceSession</h4>
<pre>public&nbsp;void&nbsp;announceSession()</pre>
<div class="block">INTERNAL:
Send out an announcement that we are here.</div>
</li>
</ul>
<a name="startDiscovery--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>startDiscovery</h4>
<pre>public&nbsp;void&nbsp;startDiscovery()</pre>
<div class="block">ADVANCED:
Announce the local service and join the cluster</div>
</li>
</ul>
<a name="stopDiscovery--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stopDiscovery</h4>
<pre>public&nbsp;void&nbsp;stopDiscovery()</pre>
<div class="block">ADVANCED:
Stop accepting announcements from other services becoming available.
Note that this does not remove the local service from the cluster.</div>
</li>
</ul>
<a name="isDiscoveryStopped--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDiscoveryStopped</h4>
<pre>public&nbsp;boolean&nbsp;isDiscoveryStopped()</pre>
<div class="block">ADVANCED:
Return true if discovery has been stopped at the time this method is called.
If false is returned then it is undefined whether discovery is started or
stopped. It may be started, or it may be in the process of starting or
stopping.</div>
</li>
</ul>
<a name="createCommunicationSocket--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>createCommunicationSocket</h4>
<pre>public&nbsp;void&nbsp;createCommunicationSocket()</pre>
<div class="block">INTERNAL:
Create the multicast socket and join the multicast group.</div>
</li>
</ul>
<a name="getCommunicationSocket--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getCommunicationSocket</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/net/MulticastSocket.html?is-external=true" title="class or interface in java.net">MulticastSocket</a>&nbsp;getCommunicationSocket()</pre>
<div class="block">INTERNAL:
Return the socket that will be used for the multicast.</div>
</li>
</ul>
<a name="run--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>run</h4>
<pre>public&nbsp;void&nbsp;run()</pre>
<div class="block">INTERNAL:
This is the main execution method of discovery. It will create a socket to
listen on, create a local connection for this service and announce that we are
open for business.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true#run--" title="class or interface in java.lang">run</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Runnable.html?is-external=true" title="class or interface in java.lang">Runnable</a></code></dd>
</dl>
</li>
</ul>
<a name="startListening--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>startListening</h4>
<pre>public&nbsp;void&nbsp;startListening()</pre>
<div class="block">INTERNAL:
This method puts us into the listening mode loop. This thread blocks, waiting
on announcements that we receive from other discovery managers.</div>
</li>
</ul>
<a name="stopListening--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stopListening</h4>
<pre>public&nbsp;void&nbsp;stopListening()</pre>
<div class="block">INTERNAL:
Signal this instance to stop listening.</div>
</li>
</ul>
<a name="receivedAnnouncement-org.eclipse.persistence.sessions.coordination.ServiceId-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>receivedAnnouncement</h4>
<pre>public&nbsp;void&nbsp;receivedAnnouncement(<a href="../../../../../org/eclipse/persistence/sessions/coordination/ServiceId.html" title="class in org.eclipse.persistence.sessions.coordination">ServiceId</a>&nbsp;serviceId)</pre>
<div class="block">INTERNAL:
Process the announcement that indicates that a new service is online</div>
</li>
</ul>
<a name="setAnnouncementDelay-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setAnnouncementDelay</h4>
<pre>public&nbsp;void&nbsp;setAnnouncementDelay(int&nbsp;millisecondsToDelay)</pre>
<div class="block">PUBLIC:
Set the amount of time in millis that the service should wait between the time
that this Remote Service is available and a session announcement is sent out
to other discovery managers. This may be needed to give some systems more time
to post their connections into the naming service. Takes effect the next time
listening is started.</div>
</li>
</ul>
<a name="getAnnouncementDelay--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAnnouncementDelay</h4>
<pre>public&nbsp;int&nbsp;getAnnouncementDelay()</pre>
<div class="block">PUBLIC:
Return the amount of time in millis that the service should wait between the time
that this Remote Service is available and a session announcement is sent out
to other discovery managers.</div>
</li>
</ul>
<a name="getMulticastGroupAddress--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMulticastGroupAddress</h4>
<pre>public&nbsp;<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;getMulticastGroupAddress()</pre>
<div class="block">PUBLIC:
Return the host address of the multicast group.</div>
</li>
</ul>
<a name="setMulticastGroupAddress-java.lang.String-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMulticastGroupAddress</h4>
<pre>public&nbsp;void&nbsp;setMulticastGroupAddress(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;address)</pre>
<div class="block">PUBLIC:
Set the host address of the multicast group. Takes effect the next time
listening is started.</div>
</li>
</ul>
<a name="setMulticastPort-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMulticastPort</h4>
<pre>public&nbsp;void&nbsp;setMulticastPort(int&nbsp;port)</pre>
<div class="block">PUBLIC:
Set the multicast port used for discovery. Takes effect the next time
listening is started.</div>
</li>
</ul>
<a name="getMulticastPort--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMulticastPort</h4>
<pre>public&nbsp;int&nbsp;getMulticastPort()</pre>
<div class="block">PUBLIC:
Return the multicast port used for discovery.</div>
</li>
</ul>
<a name="shallowCopy-org.eclipse.persistence.sessions.coordination.DiscoveryManager-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>shallowCopy</h4>
<pre>protected&nbsp;void&nbsp;shallowCopy(<a href="../../../../../org/eclipse/persistence/sessions/coordination/DiscoveryManager.html" title="class in org.eclipse.persistence.sessions.coordination">DiscoveryManager</a>&nbsp;dmgr)</pre>
<div class="block">INTERNAL: invoke when the RCM shutdown. Subclass overrides this method if necessary.</div>
</li>
</ul>
<a name="getPacketTimeToLive--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getPacketTimeToLive</h4>
<pre>public&nbsp;int&nbsp;getPacketTimeToLive()</pre>
<div class="block">PUBLIC:
Returns the number of hops the data packets of the session announcement will take before expiring.
The default is 2, a hub and an interface card to prevent the data packets from leaving the local network.</div>
</li>
</ul>
<a name="setPacketTimeToLive-int-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>setPacketTimeToLive</h4>
<pre>public&nbsp;void&nbsp;setPacketTimeToLive(int&nbsp;newPacketTimeToLive)</pre>
<div class="block">PUBLIC:
Set the number of hops the data packets of the session announcement will take before expiring.
The default is 2, a hub and an interface card to prevent the data packets from leaving the local network.
Note that if sessions are hosted on different LANs that are part of WAN, the announcement sending by one session
may not reach other sessions. In this case, consult your network administrator for the right time-to-live value
or test your network by increase the value until sessions receive announcement sent by others.</div>
</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 class="aboutLanguage">EclipseLink 3.0.0, API Reference</div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/eclipse/persistence/sessions/coordination/CommandProcessor.html" title="interface in org.eclipse.persistence.sessions.coordination"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../org/eclipse/persistence/sessions/coordination/MergeChangeSetCommand.html" title="class in org.eclipse.persistence.sessions.coordination"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/eclipse/persistence/sessions/coordination/DiscoveryManager.html" target="_top">Frames</a></li>
<li><a href="DiscoveryManager.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><a href="#field.summary">Field</a>&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><a href="#field.detail">Field</a>&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 ======= -->
<p class="legalCopy"><small>Copyright &#169; 2007&#x2013;2020 <a href="http://www.eclipse.org/eclipselink">Eclipse.org - EclipseLink Project</a>. All rights reserved.</small></p>
</body>
</html>