| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <META NAME="ROBOTS" CONTENT="NOINDEX"> |
| <link rel="canonical" href="https://ignite.apache.org/releases/1.7.0/javadoc/org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html" /> |
| <!-- Generated by javadoc (version 1.7.0_80) on Mon Aug 01 20:32:32 MSK 2016 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>WeightedRandomLoadBalancingSpi (Ignite 1.7.0)</title> |
| <meta name="date" content="2016-08-01"> |
| <link rel="stylesheet" type="text/css" href="../../../../../../javadoc.css" title="Style"> |
| |
| <script> |
| (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
| (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
| m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
| })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); |
| |
| ga('create', 'UA-61232409-1', 'auto'); |
| ga('send', 'pageview'); |
| |
| </script></head> |
| <body> |
| <script type="text/javascript"><!-- |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="WeightedRandomLoadBalancingSpi (Ignite 1.7.0)"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar_top"> |
| <!-- --> |
| </a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/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 class="aboutLanguage"><em>Ignite - In-Memory Data Fabric</em></div> |
| </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="strong">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="http://docs.oracle.com/javase/7/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/IgniteSpiManagementMBean.html" title="interface in org.apache.ignite.spi">IgniteSpiManagementMBean</a>, <a href="../../../../../../org/apache/ignite/spi/loadbalancing/LoadBalancingSpi.html" title="interface in org.apache.ignite.spi.loadbalancing">LoadBalancingSpi</a>, <a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpiMBean.html" title="interface in org.apache.ignite.spi.loadbalancing.weightedrandom">WeightedRandomLoadBalancingSpiMBean</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="strong">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>, <a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpiMBean.html" title="interface in org.apache.ignite.spi.loadbalancing.weightedrandom">WeightedRandomLoadBalancingSpiMBean</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="overviewSummary" 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><strong><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#DFLT_NODE_WEIGHT">DFLT_NODE_WEIGHT</a></strong></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="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#NODE_WEIGHT_ATTR_NAME">NODE_WEIGHT_ATTR_NAME</a></strong></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#gridName">gridName</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#ignite">ignite</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="overviewSummary" 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><strong><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#WeightedRandomLoadBalancingSpi()">WeightedRandomLoadBalancingSpi</a></strong>()</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="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span>Methods</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="../../../../../../org/apache/ignite/cluster/ClusterNode.html" title="interface in org.apache.ignite.cluster">ClusterNode</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#getBalancedNode(org.apache.ignite.compute.ComputeTaskSession,%20java.util.List,%20org.apache.ignite.compute.ComputeJob)">getBalancedNode</a></strong>(<a href="../../../../../../org/apache/ignite/compute/ComputeTaskSession.html" title="interface in org.apache.ignite.compute">ComputeTaskSession</a> ses, |
| <a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/ignite/cluster/ClusterNode.html" title="interface in org.apache.ignite.cluster">ClusterNode</a>> 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 class="rowColor"> |
| <td class="colFirst"><code>protected <a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#getConsistentAttributeNames()">getConsistentAttributeNames</a></strong>()</code> |
| <div class="block">Returns back a list of attributes that should be consistent |
| for this SPI.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#getNodeAttributes()">getNodeAttributes</a></strong>()</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 class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#getNodeWeight()">getNodeWeight</a></strong>()</code> |
| <div class="block">Gets weight of this node.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#isUseWeights()">isUseWeights</a></strong>()</code> |
| <div class="block">Checks whether node weights are considered when doing |
| random load balancing.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#onContextDestroyed0()">onContextDestroyed0</a></strong>()</code> |
| <div class="block">Method to be called in the beginning of onContextDestroyed() method.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#onContextInitialized0(org.apache.ignite.spi.IgniteSpiContext)">onContextInitialized0</a></strong>(<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 class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#setNodeWeight(int)">setNodeWeight</a></strong>(int nodeWeight)</code> |
| <div class="block">Sets weight of this node.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#setUseWeights(boolean)">setUseWeights</a></strong>(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 class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#spiStart(java.lang.String)">spiStart</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> gridName)</code> |
| <div class="block">This method is called to start SPI.</div> |
| </td> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#spiStop()">spiStop</a></strong>()</code> |
| <div class="block">This method is called to stop SPI.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><strong><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpi.html#toString()">toString</a></strong>()</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,%20java.lang.String)">assertParameter</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#checkConfigurationConsistency0(org.apache.ignite.spi.IgniteSpiContext,%20org.apache.ignite.cluster.ClusterNode,%20boolean)">checkConfigurationConsistency0</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#configInfo(java.lang.String,%20java.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#getIgniteHome()">getIgniteHome</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#getLocalNode()">getLocalNode</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#getLocalNodeId()">getLocalNodeId</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#getStartTimestamp()">getStartTimestamp</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#getStartTimestampFormatted()">getStartTimestampFormatted</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#getUpTime()">getUpTime</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiAdapter.html#getUpTimeFormatted()">getUpTimeFormatted</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,%20T,%20java.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#setName(java.lang.String)">setName</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="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)" 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> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods_inherited_from_class_org.apache.ignite.spi.IgniteSpiManagementMBean"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.ignite.spi.<a href="../../../../../../org/apache/ignite/spi/IgniteSpiManagementMBean.html" title="interface in org.apache.ignite.spi">IgniteSpiManagementMBean</a></h3> |
| <code><a href="../../../../../../org/apache/ignite/spi/IgniteSpiManagementMBean.html#getIgniteHome()">getIgniteHome</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiManagementMBean.html#getLocalNodeId()">getLocalNodeId</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiManagementMBean.html#getName()">getName</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiManagementMBean.html#getStartTimestamp()">getStartTimestamp</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiManagementMBean.html#getStartTimestampFormatted()">getStartTimestampFormatted</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiManagementMBean.html#getUpTime()">getUpTime</a>, <a href="../../../../../../org/apache/ignite/spi/IgniteSpiManagementMBean.html#getUpTimeFormatted()">getUpTimeFormatted</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="http://docs.oracle.com/javase/7/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="strong">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="strong">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 void 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="strong">Parameters:</span></dt><dd><code>isUseWeights</code> - If <code>true</code> then random load is distributed according |
| to node weights.</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">Checks whether node weights are considered when doing |
| random load balancing.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpiMBean.html#isUseWeights()">isUseWeights</a></code> in interface <code><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpiMBean.html" title="interface in org.apache.ignite.spi.loadbalancing.weightedrandom">WeightedRandomLoadBalancingSpiMBean</a></code></dd> |
| <dt><span class="strong">Returns:</span></dt><dd>If <code>true</code> then random load is distributed according |
| to node weights.</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 void 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="strong">Parameters:</span></dt><dd><code>nodeWeight</code> - Weight of this node.</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">Gets weight of this node.</div> |
| <dl> |
| <dt><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpiMBean.html#getNodeWeight()">getNodeWeight</a></code> in interface <code><a href="../../../../../../org/apache/ignite/spi/loadbalancing/weightedrandom/WeightedRandomLoadBalancingSpiMBean.html" title="interface in org.apache.ignite.spi.loadbalancing.weightedrandom">WeightedRandomLoadBalancingSpiMBean</a></code></dd> |
| <dt><span class="strong">Returns:</span></dt><dd>Weight of this node.</dd></dl> |
| </li> |
| </ul> |
| <a name="getNodeAttributes()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getNodeAttributes</h4> |
| <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/util/Map.html?is-external=true" title="class or interface in java.util">Map</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>,<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>> 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><strong>Specified by:</strong></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><strong>Overrides:</strong></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="strong">Returns:</span></dt><dd>Map of local node attributes this SPI wants to add.</dd> |
| <dt><span class="strong">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 |
| <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> gridName) |
| 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><strong>Specified by:</strong></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="strong">Parameters:</span></dt><dd><code>gridName</code> - Name of grid instance this SPI is being started for |
| (<code>null</code> for default grid).</dd> |
| <dt><span class="strong">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><strong>Specified by:</strong></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="strong">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><strong>Overrides:</strong></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="strong">Parameters:</span></dt><dd><code>spiCtx</code> - SPI context.</dd> |
| <dt><span class="strong">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><strong>Overrides:</strong></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="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../org/apache/ignite/cluster/ClusterNode.html" title="interface in org.apache.ignite.cluster">ClusterNode</a>> 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><strong>Specified by:</strong></dt> |
| <dd><code><a href="../../../../../../org/apache/ignite/spi/loadbalancing/LoadBalancingSpi.html#getBalancedNode(org.apache.ignite.compute.ComputeTaskSession,%20java.util.List,%20org.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="strong">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="strong">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="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>> 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><strong>Overrides:</strong></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="strong">Returns:</span></dt><dd>List or attribute names.</dd></dl> |
| </li> |
| </ul> |
| <a name="toString()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>toString</h4> |
| <pre>public <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> toString()</pre> |
| <dl> |
| <dt><strong>Overrides:</strong></dt> |
| <dd><code><a href="http://docs.oracle.com/javase/7/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="http://docs.oracle.com/javase/7/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><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/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 class="aboutLanguage"><em>Ignite - In-Memory Data Fabric</em></div> |
| </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="strong">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>2015 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> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script> </td> </tr> <tr> <td colspan="2" valign="top" align="left"> <table style="padding-left: 0; margin: 0"> <tbody style="padding: 0; margin: 0"> <tr style="padding: 0; margin: 0"> <td> <b>Ignite Fabric</b> </td> <td>: ver. <strong>1.7.0</strong> </td> </tr> <tr style="padding: 0; margin: 0"> <td> <b>Release Date</b> </td> <td>: August 1 2016 </td> </tr> </tbody> </table> </td> </tr> </table></small></p> |
| </body> |
| </html> |