| <!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_261) on Mon Dec 20 14:15:51 MSK 2021 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>WeightedRandomLoadBalancingSpi (Ignite 2.11.1)</title> |
| <meta name="date" content="2021-12-20"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../../script.js"></script> |
| <link rel='shortcut icon' href='https://ignite.apache.org/favicon.ico'/> |
| </head> |
| |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="WeightedRandomLoadBalancingSpi (Ignite 2.11.1)"; |
| } |
| } |
| 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}; |
| 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="class-use/WeightedRandomLoadBalancingSpi.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> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li>Prev Class</li> |
| <li><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpiMBean.html" title="interface in org.apache.ignite.spi.loadbalancing.weightedrandom"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html" target="_top">Frames</a></li> |
| <li><a href="WeightedRandomLoadBalancingSpi.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: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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.spi.loadbalancing.weightedrandom</div> |
| <h2 title="Class WeightedRandomLoadBalancingSpi" class="title">Class WeightedRandomLoadBalancingSpi</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><a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html" title="class in org.apache.ignite.spi">org.apache.ignite.spi.IgniteSpiAdapter</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.ignite.spi.loadbalancing.weightedrandom.WeightedRandomLoadBalancingSpi</li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><a href="../../../../../../org/apache/ignite/spi/IgniteSpi.html" title="interface in org.apache.ignite.spi">IgniteSpi</a>, <a href="../../../../../../org/apache/ignite/spi/loadbalancing/LoadBalancingSpi.html" title="interface in org.apache.ignite.spi.loadbalancing">LoadBalancingSpi</a></dd> |
| </dl> |
| <hr> |
| <br> |
| <pre><a href="../../../../../../org/apache/ignite/spi/IgniteSpiMultipleInstancesSupport.html" title="annotation in org.apache.ignite.spi">@IgniteSpiMultipleInstancesSupport</a>(<a href="../../../../../../org/apache/ignite/spi/IgniteSpiMultipleInstancesSupport.html#value--">value</a>=true) |
| <a href="../../../../../../org/apache/ignite/spi/IgniteSpiConsistencyChecked.html" title="annotation in org.apache.ignite.spi">@IgniteSpiConsistencyChecked</a>(<a href="../../../../../../org/apache/ignite/spi/IgniteSpiConsistencyChecked.html#optional--">optional</a>=true) |
| public class <span class="typeNameLabel">WeightedRandomLoadBalancingSpi</span> |
| extends <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html" title="class in org.apache.ignite.spi">IgniteSpiAdapter</a> |
| implements <a href="../../../../../../org/apache/ignite/spi/loadbalancing/LoadBalancingSpi.html" title="interface in org.apache.ignite.spi.loadbalancing">LoadBalancingSpi</a></pre> |
| <div class="block">Load balancing SPI that picks a random node for job execution. Note that you can |
| optionally assign weights to nodes, so nodes with larger weights will end up getting |
| proportionally more jobs routed to them (see <a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#setNodeWeight-int-"><code>setNodeWeight(int)</code></a> |
| configuration property). By default all nodes get equal weight defined by |
| <a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#DFLT_NODE_WEIGHT"><code>DFLT_NODE_WEIGHT</code></a> (value is <code>10</code>). |
| <h1 class="header">Coding Example</h1> |
| If you are using <a href="../../../../../../org/apache/ignite/compute/ComputeTaskSplitAdapter.html" title="class in org.apache.ignite.compute"><code>ComputeTaskSplitAdapter</code></a> then load balancing logic |
| is transparent to your code and is handled automatically by the adapter. |
| Here is an example of how your task could look: |
| <pre name="code" class="java"> |
| public class MyFooBarTask extends ComputeTaskSplitAdapter<Object, Object> { |
| @Override |
| protected Collection<? extends ComputeJob> split(int gridSize, Object arg) throws IgniteCheckedException { |
| List<MyFooBarJob> jobs = new ArrayList<MyFooBarJob>(gridSize); |
| |
| for (int i = 0; i < gridSize; i++) { |
| jobs.add(new MyFooBarJob(arg)); |
| } |
| |
| // Node assignment via load balancer |
| // happens automatically. |
| return jobs; |
| } |
| ... |
| } |
| </pre> |
| If you need more fine-grained control over how some jobs within task get mapped to a node |
| and use affinity load balancing for some other jobs within task, then you should use |
| <a href="../../../../../../org/apache/ignite/compute/ComputeTaskAdapter.html" title="class in org.apache.ignite.compute"><code>ComputeTaskAdapter</code></a>. Here is an example of how your task will look. Note that in this |
| case we manually inject load balancer and use it to pick the best node. Doing it in |
| such way would allow user to map some jobs manually and for others use load balancer. |
| <pre name="code" class="java"> |
| public class MyFooBarTask extends ComputeTaskAdapter<String, String> { |
| // Inject load balancer. |
| @LoadBalancerResource |
| ComputeLoadBalancer balancer; |
| |
| // Map jobs to grid nodes. |
| public Map<? extends ComputeJob, ClusterNode> map(List<ClusterNode> subgrid, String arg) throws IgniteCheckedException { |
| Map<MyFooBarJob, ClusterNode> jobs = new HashMap<MyFooBarJob, ClusterNode>(subgrid.size()); |
| |
| // In more complex cases, you can actually do |
| // more complicated assignments of jobs to nodes. |
| for (int i = 0; i < subgrid.size(); i++) { |
| // Pick the next best balanced node for the job. |
| jobs.put(new MyFooBarJob(arg), balancer.getBalancedNode()) |
| } |
| |
| return jobs; |
| } |
| |
| // Aggregate results into one compound result. |
| public String reduce(List<ComputeJobResult> results) throws IgniteCheckedException { |
| // For the purpose of this example we simply |
| // concatenate string representation of every |
| // job result |
| StringBuilder buf = new StringBuilder(); |
| |
| for (ComputeJobResult res : results) { |
| // Append string representation of result |
| // returned by every job. |
| buf.append(res.getData().string()); |
| } |
| |
| return buf.string(); |
| } |
| } |
| </pre> |
| <p> |
| <h1 class="header">Configuration</h1> |
| In order to use this load balancer, you should configure your grid instance |
| to use <a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html" title="class in org.apache.ignite.spi.loadbalancing.weightedrandom"><code>WeightedRandomLoadBalancingSpi</code></a> either from Spring XML file or |
| directly. The following configuration parameters are supported: |
| <h2 class="header">Mandatory</h2> |
| This SPI has no mandatory configuration parameters. |
| <h2 class="header">Optional</h2> |
| The following configuration parameters are optional: |
| <ul> |
| <li> |
| Flag that indicates whether to use weight policy or simple random policy |
| (see <a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#setUseWeights-boolean-"><code>setUseWeights(boolean)</code></a>) |
| </li> |
| <li> |
| Weight of this node (see <a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#setNodeWeight-int-"><code>setNodeWeight(int)</code></a>). This parameter is ignored |
| if <a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#setUseWeights-boolean-"><code>setUseWeights(boolean)</code></a> is set to <code>false</code>. |
| </li> |
| </ul> |
| Below is Java configuration example: |
| <pre name="code" class="java"> |
| WeightedRandomLoadBalancingSpi spi = new WeightedRandomLoadBalancingSpi(); |
| |
| // Configure SPI to used weighted |
| // random load balancing. |
| spi.setUseWeights(true); |
| |
| // Set weight for the local node. |
| spi.setWeight( *); |
| |
| IgniteConfiguration cfg = new IgniteConfiguration(); |
| |
| // Override default load balancing SPI. |
| cfg.setLoadBalancingSpi(spi); |
| |
| // Starts grid. |
| G.start(cfg); |
| </pre> |
| Here is how you can configure <a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html" title="class in org.apache.ignite.spi.loadbalancing.weightedrandom"><code>WeightedRandomLoadBalancingSpi</code></a> using Spring XML configuration: |
| <pre name="code" class="xml"> |
| <property name="loadBalancingSpi"> |
| <bean class="org.apache.ignite.spi.loadBalancing.weightedrandom.WeightedRandomLoadBalancingSpi"> |
| <property name="useWeights" value="true"/> |
| <property name="nodeWeight" value="10"/> |
| </bean> |
| </property> |
| </pre> |
| <p> |
| <img src="http://ignite.apache.org/images/spring-small.png"> |
| <br> |
| For information about Spring framework visit <a href="http://www.springframework.org/">www.springframework.org</a></div> |
| </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"> </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>static int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#DFLT_NODE_WEIGHT">DFLT_NODE_WEIGHT</a></span></code> |
| <div class="block">Default weight assigned to every node if explicit one is not provided (value is <code>10</code>).</div> |
| </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/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#NODE_WEIGHT_ATTR_NAME">NODE_WEIGHT_ATTR_NAME</a></span></code> |
| <div class="block">Name of node attribute used to indicate load weight of a node |
| (value is <code>"ignite.node.weight.attr.name"</code>).</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="fields.inherited.from.class.org.apache.ignite.spi.IgniteSpiAdapter"> |
| <!-- --> |
| </a> |
| <h3>Fields inherited from class org.apache.ignite.spi.<a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html" title="class in org.apache.ignite.spi">IgniteSpiAdapter</a></h3> |
| <code><a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#ignite">ignite</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#igniteInstanceName">igniteInstanceName</a></code></li> |
| </ul> |
| </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"> </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/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#WeightedRandomLoadBalancingSpi--">WeightedRandomLoadBalancingSpi</a></span>()</code> </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"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </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="../../../../../../org/apache/ignite/cluster/ClusterNode.html" title="interface in org.apache.ignite.cluster">ClusterNode</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#getBalancedNode-org.apache.ignite.compute.ComputeTaskSession-java.util.List-org.apache.ignite.compute.ComputeJob-">getBalancedNode</a></span>(<a href="../../../../../../org/apache/ignite/compute/ComputeTaskSession.html" title="interface in org.apache.ignite.compute">ComputeTaskSession</a> ses, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><span class='angle_bracket'><</span><a href="../../../../../../org/apache/ignite/cluster/ClusterNode.html" title="interface in org.apache.ignite.cluster">ClusterNode</a><span class='angle_bracket'>></span> top, |
| <a href="../../../../../../org/apache/ignite/compute/ComputeJob.html" title="interface in org.apache.ignite.compute">ComputeJob</a> job)</code> |
| <div class="block">Gets balanced node for specified job within given task session.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><span class='angle_bracket'><</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><span class='angle_bracket'>></span></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#getConsistentAttributeNames--">getConsistentAttributeNames</a></span>()</code> |
| <div class="block">Returns back a list of attributes that should be consistent |
| for this SPI.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><span class='angle_bracket'><</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>,<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><span class='angle_bracket'>></span></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#getNodeAttributes--">getNodeAttributes</a></span>()</code> |
| <div class="block">This method is called before SPI starts (before method <a href="../../../../../../org/apache/ignite/spi/IgniteSpi.html#spiStart-java.lang.String-"><code>IgniteSpi.spiStart(String)</code></a> |
| is called).</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#getNodeWeight--">getNodeWeight</a></span>()</code> |
| <div class="block">See <a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#setNodeWeight-int-"><code>setNodeWeight(int)</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#isUseWeights--">isUseWeights</a></span>()</code> |
| <div class="block">See <a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#setUseWeights-boolean-"><code>setUseWeights(boolean)</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#onContextDestroyed0--">onContextDestroyed0</a></span>()</code> |
| <div class="block">Method to be called in the beginning of onContextDestroyed() method.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#onContextInitialized0-org.apache.ignite.spi.IgniteSpiContext-">onContextInitialized0</a></span>(<a href="../../../../../../org/apache/ignite/spi/IgniteSpiContext.html" title="interface in org.apache.ignite.spi">IgniteSpiContext</a> spiCtx)</code> |
| <div class="block">Method to be called in the end of onContextInitialized method.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html" title="class in org.apache.ignite.spi.loadbalancing.weightedrandom">WeightedRandomLoadBalancingSpi</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#setName-java.lang.String-">setName</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> name)</code> |
| <div class="block">Sets SPI name.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html" title="class in org.apache.ignite.spi.loadbalancing.weightedrandom">WeightedRandomLoadBalancingSpi</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#setNodeWeight-int-">setNodeWeight</a></span>(int nodeWeight)</code> |
| <div class="block">Sets weight of this node.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html" title="class in org.apache.ignite.spi.loadbalancing.weightedrandom">WeightedRandomLoadBalancingSpi</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#setUseWeights-boolean-">setUseWeights</a></span>(boolean isUseWeights)</code> |
| <div class="block">Sets a flag to indicate whether node weights should be checked when |
| doing random load balancing.</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/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#spiStart-java.lang.String-">spiStart</a></span>(@Nullable <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> igniteInstanceName)</code> |
| <div class="block">This method is called to start SPI.</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/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#spiStop--">spiStop</a></span>()</code> |
| <div class="block">This method is called to stop SPI.</div> |
| </td> |
| </tr> |
| <tr id="i12" 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/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#toString--">toString</a></span>()</code></td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.ignite.spi.IgniteSpiAdapter"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.ignite.spi.<a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html" title="class in org.apache.ignite.spi">IgniteSpiAdapter</a></h3> |
| <code><a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#addTimeoutObject-org.apache.ignite.spi.IgniteSpiTimeoutObject-">addTimeoutObject</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#assertParameter-boolean-java.lang.String-">assertParameter</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#checkConfigurationConsistency0-org.apache.ignite.spi.IgniteSpiContext-org.apache.ignite.cluster.ClusterNode-boolean-">checkConfigurationConsistency0</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#clientFailureDetectionTimeout--">clientFailureDetectionTimeout</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#configInfo-java.lang.String-java.lang.Object-">configInfo</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#createSpiAttributeName-java.lang.String-">createSpiAttributeName</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#failureDetectionTimeout--">failureDetectionTimeout</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#failureDetectionTimeoutEnabled--">failureDetectionTimeoutEnabled</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#failureDetectionTimeoutEnabled-boolean-">failureDetectionTimeoutEnabled</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#getExceptionRegistry--">getExceptionRegistry</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#getLocalNode--">getLocalNode</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#getName--">getName</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#getSpiContext--">getSpiContext</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#ignite--">ignite</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#initFailureDetectionTimeout--">initFailureDetectionTimeout</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#injectables--">injectables</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#injectResources-org.apache.ignite.Ignite-">injectResources</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#isNodeStopping--">isNodeStopping</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#onBeforeStart--">onBeforeStart</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#onClientDisconnected-org.apache.ignite.lang.IgniteFuture-">onClientDisconnected</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#onClientReconnected-boolean-">onClientReconnected</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#onContextDestroyed--">onContextDestroyed</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#onContextInitialized-org.apache.ignite.spi.IgniteSpiContext-">onContextInitialized</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#registerMBean-java.lang.String-T-java.lang.Class-">registerMBean</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#removeTimeoutObject-org.apache.ignite.spi.IgniteSpiTimeoutObject-">removeTimeoutObject</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#started--">started</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#startInfo--">startInfo</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#startStopwatch--">startStopwatch</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#stopInfo--">stopInfo</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#unregisterMBean--">unregisterMBean</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class 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#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> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.org.apache.ignite.spi.IgniteSpi"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.ignite.spi.<a href="../../../../../../org/apache/ignite/spi/IgniteSpi.html" title="interface in org.apache.ignite.spi">IgniteSpi</a></h3> |
| <code><a href="../../../../../../org/apache/ignite/spi/IgniteSpi.html#getName--">getName</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpi.html#onClientDisconnected-org.apache.ignite.lang.IgniteFuture-">onClientDisconnected</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpi.html#onClientReconnected-boolean-">onClientReconnected</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpi.html#onContextDestroyed--">onContextDestroyed</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpi.html#onContextInitialized-org.apache.ignite.spi.IgniteSpiContext-">onContextInitialized</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="NODE_WEIGHT_ATTR_NAME"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>NODE_WEIGHT_ATTR_NAME</h4> |
| <pre>public static final <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> NODE_WEIGHT_ATTR_NAME</pre> |
| <div class="block">Name of node attribute used to indicate load weight of a node |
| (value is <code>"ignite.node.weight.attr.name"</code>).</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../org/apache/ignite/cluster/ClusterNode.html#attributes--"><code>ClusterNode.attributes()</code></a>, |
| <a href="../../../../../../constant-values.html#org.apache.ignite.spi.loadbalancing.weightedrandom.WeightedRandomLoadBalancingSpi.NODE_WEIGHT_ATTR_NAME">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="DFLT_NODE_WEIGHT"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>DFLT_NODE_WEIGHT</h4> |
| <pre>public static final int DFLT_NODE_WEIGHT</pre> |
| <div class="block">Default weight assigned to every node if explicit one is not provided (value is <code>10</code>).</div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../../../../../../constant-values.html#org.apache.ignite.spi.loadbalancing.weightedrandom.WeightedRandomLoadBalancingSpi.DFLT_NODE_WEIGHT">Constant Field Values</a></dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="WeightedRandomLoadBalancingSpi--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>WeightedRandomLoadBalancingSpi</h4> |
| <pre>public WeightedRandomLoadBalancingSpi()</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="setUseWeights-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setUseWeights</h4> |
| <pre><a href="../../../../../../org/apache/ignite/spi/IgniteSpiConfiguration.html" title="annotation in org.apache.ignite.spi">@IgniteSpiConfiguration</a>(<a href="../../../../../../org/apache/ignite/spi/IgniteSpiConfiguration.html#optional--">optional</a>=true) |
| public <a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html" title="class in org.apache.ignite.spi.loadbalancing.weightedrandom">WeightedRandomLoadBalancingSpi</a> setUseWeights(boolean isUseWeights)</pre> |
| <div class="block">Sets a flag to indicate whether node weights should be checked when |
| doing random load balancing. Default value is <code>false</code> which |
| means that node weights are disregarded for load balancing logic.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>isUseWeights</code> - If <code>true</code> then random load is distributed according |
| to node weights.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>this</code> for chaining.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isUseWeights--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isUseWeights</h4> |
| <pre>public boolean isUseWeights()</pre> |
| <div class="block">See <a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#setUseWeights-boolean-"><code>setUseWeights(boolean)</code></a>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Maximum sparsity.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setNodeWeight-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setNodeWeight</h4> |
| <pre><a href="../../../../../../org/apache/ignite/spi/IgniteSpiConfiguration.html" title="annotation in org.apache.ignite.spi">@IgniteSpiConfiguration</a>(<a href="../../../../../../org/apache/ignite/spi/IgniteSpiConfiguration.html#optional--">optional</a>=true) |
| public <a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html" title="class in org.apache.ignite.spi.loadbalancing.weightedrandom">WeightedRandomLoadBalancingSpi</a> setNodeWeight(int nodeWeight)</pre> |
| <div class="block">Sets weight of this node. Nodes with more processing capacity |
| should be assigned proportionally larger weight. Default value |
| is <a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#DFLT_NODE_WEIGHT"><code>DFLT_NODE_WEIGHT</code></a> and is equal for all nodes.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>nodeWeight</code> - Weight of this node.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>this</code> for chaining.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getNodeWeight--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getNodeWeight</h4> |
| <pre>public int getNodeWeight()</pre> |
| <div class="block">See <a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#setNodeWeight-int-"><code>setNodeWeight(int)</code></a>.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Maximum sparsity.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getNodeAttributes--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getNodeAttributes</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><span class='angle_bracket'><</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>,<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><span class='angle_bracket'>></span> getNodeAttributes() |
| throws <a href="../../../../../../org/apache/ignite/spi/IgniteSpiException.html" title="class in org.apache.ignite.spi">IgniteSpiException</a></pre> |
| <div class="block">This method is called before SPI starts (before method <a href="../../../../../../org/apache/ignite/spi/IgniteSpi.html#spiStart-java.lang.String-"><code>IgniteSpi.spiStart(String)</code></a> |
| is called). It allows SPI implementation to add attributes to a local |
| node. Kernal collects these attributes from all SPI implementations |
| loaded up and then passes it to discovery SPI so that they can be |
| exchanged with other nodes.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/ignite/spi/IgniteSpi.html#getNodeAttributes--">getNodeAttributes</a></code> in interface <code><a href="../../../../../../org/apache/ignite/spi/IgniteSpi.html" title="interface in org.apache.ignite.spi">IgniteSpi</a></code></dd> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#getNodeAttributes--">getNodeAttributes</a></code> in class <code><a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html" title="class in org.apache.ignite.spi">IgniteSpiAdapter</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Map of local node attributes this SPI wants to add.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/ignite/spi/IgniteSpiException.html" title="class in org.apache.ignite.spi">IgniteSpiException</a></code> - Throws in case of any error.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="spiStart-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>spiStart</h4> |
| <pre>public void spiStart(@Nullable |
| @Nullable <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> igniteInstanceName) |
| throws <a href="../../../../../../org/apache/ignite/spi/IgniteSpiException.html" title="class in org.apache.ignite.spi">IgniteSpiException</a></pre> |
| <div class="block">This method is called to start SPI. After this method returns |
| successfully kernel assumes that SPI is fully operational.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/ignite/spi/IgniteSpi.html#spiStart-java.lang.String-">spiStart</a></code> in interface <code><a href="../../../../../../org/apache/ignite/spi/IgniteSpi.html" title="interface in org.apache.ignite.spi">IgniteSpi</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>igniteInstanceName</code> - Name of Ignite instance this SPI is being started for |
| (<code>null</code> for default Ignite instance).</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/ignite/spi/IgniteSpiException.html" title="class in org.apache.ignite.spi">IgniteSpiException</a></code> - Throws in case of any error during SPI start.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="spiStop--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>spiStop</h4> |
| <pre>public void spiStop() |
| throws <a href="../../../../../../org/apache/ignite/spi/IgniteSpiException.html" title="class in org.apache.ignite.spi">IgniteSpiException</a></pre> |
| <div class="block">This method is called to stop SPI. After this method returns kernel |
| assumes that this SPI is finished and all resources acquired by it |
| are released. |
| <p> |
| <b> |
| Note that this method can be called at any point including during |
| recovery of failed start. It should make no assumptions on what state SPI |
| will be in when this method is called. |
| </b></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/ignite/spi/IgniteSpi.html#spiStop--">spiStop</a></code> in interface <code><a href="../../../../../../org/apache/ignite/spi/IgniteSpi.html" title="interface in org.apache.ignite.spi">IgniteSpi</a></code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/ignite/spi/IgniteSpiException.html" title="class in org.apache.ignite.spi">IgniteSpiException</a></code> - Thrown in case of any error during SPI stop.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="onContextInitialized0-org.apache.ignite.spi.IgniteSpiContext-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>onContextInitialized0</h4> |
| <pre>protected void onContextInitialized0(<a href="../../../../../../org/apache/ignite/spi/IgniteSpiContext.html" title="interface in org.apache.ignite.spi">IgniteSpiContext</a> spiCtx) |
| throws <a href="../../../../../../org/apache/ignite/spi/IgniteSpiException.html" title="class in org.apache.ignite.spi">IgniteSpiException</a></pre> |
| <div class="block">Method to be called in the end of onContextInitialized method.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#onContextInitialized0-org.apache.ignite.spi.IgniteSpiContext-">onContextInitialized0</a></code> in class <code><a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html" title="class in org.apache.ignite.spi">IgniteSpiAdapter</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>spiCtx</code> - SPI context.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/ignite/spi/IgniteSpiException.html" title="class in org.apache.ignite.spi">IgniteSpiException</a></code> - In case of errors.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="onContextDestroyed0--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>onContextDestroyed0</h4> |
| <pre>protected void onContextDestroyed0()</pre> |
| <div class="block">Method to be called in the beginning of onContextDestroyed() method.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#onContextDestroyed0--">onContextDestroyed0</a></code> in class <code><a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html" title="class in org.apache.ignite.spi">IgniteSpiAdapter</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getBalancedNode-org.apache.ignite.compute.ComputeTaskSession-java.util.List-org.apache.ignite.compute.ComputeJob-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getBalancedNode</h4> |
| <pre>public <a href="../../../../../../org/apache/ignite/cluster/ClusterNode.html" title="interface in org.apache.ignite.cluster">ClusterNode</a> getBalancedNode(<a href="../../../../../../org/apache/ignite/compute/ComputeTaskSession.html" title="interface in org.apache.ignite.compute">ComputeTaskSession</a> ses, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><span class='angle_bracket'><</span><a href="../../../../../../org/apache/ignite/cluster/ClusterNode.html" title="interface in org.apache.ignite.cluster">ClusterNode</a><span class='angle_bracket'>></span> top, |
| <a href="../../../../../../org/apache/ignite/compute/ComputeJob.html" title="interface in org.apache.ignite.compute">ComputeJob</a> job)</pre> |
| <div class="block">Gets balanced node for specified job within given task session.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/ignite/spi/loadbalancing/LoadBalancingSpi.html#getBalancedNode-org.apache.ignite.compute.ComputeTaskSession-java.util.List-org.apache.ignite.compute.ComputeJob-">getBalancedNode</a></code> in interface <code><a href="../../../../../../org/apache/ignite/spi/loadbalancing/LoadBalancingSpi.html" title="interface in org.apache.ignite.spi.loadbalancing">LoadBalancingSpi</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>ses</code> - Grid task session for currently executing task.</dd> |
| <dd><code>top</code> - Topology of task nodes from which to pick the best balanced node for given job.</dd> |
| <dd><code>job</code> - Job for which to pick the best balanced node.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Best balanced node for the given job within given task session.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getConsistentAttributeNames--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getConsistentAttributeNames</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><span class='angle_bracket'><</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><span class='angle_bracket'>></span> getConsistentAttributeNames()</pre> |
| <div class="block">Returns back a list of attributes that should be consistent |
| for this SPI. Consistency means that remote node has to |
| have the same attribute with the same value.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#getConsistentAttributeNames--">getConsistentAttributeNames</a></code> in class <code><a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html" title="class in org.apache.ignite.spi">IgniteSpiAdapter</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>List or attribute names.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setName-java.lang.String-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setName</h4> |
| <pre>public <a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html" title="class in org.apache.ignite.spi.loadbalancing.weightedrandom">WeightedRandomLoadBalancingSpi</a> setName(<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> name)</pre> |
| <div class="block">Sets SPI name.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#setName-java.lang.String-">setName</a></code> in class <code><a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html" title="class in org.apache.ignite.spi">IgniteSpiAdapter</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>name</code> - SPI name.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd><code>this</code> for chaining.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="toString--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>toString</h4> |
| <pre>public <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> toString()</pre> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><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></code> in class <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></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="class-use/WeightedRandomLoadBalancingSpi.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> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li>Prev Class</li> |
| <li><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpiMBean.html" title="interface in org.apache.ignite.spi.loadbalancing.weightedrandom"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../../index.html?org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html" target="_top">Frames</a></li> |
| <li><a href="WeightedRandomLoadBalancingSpi.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: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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>2021 Copyright © 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> </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 Database and Caching Platform</b> </td> <td>: ver. <strong>2.11.1</strong> </td> </tr> <tr style="padding: 0; margin: 0"> <td> <b>Release Date</b> </td> <td>: December 20 2021 </td> </tr> </tbody> </table> </td> </tr> </table></small></p> |
| </body> |
| </html> |