blob: 1792f844b147fe40bfac67359820bc23a60ca726 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_40) on Thu Jul 20 13:15:16 PDT 2017 -->
<title>SharedResourcesBroker (gobblin-api 0.11.0 API)</title>
<meta name="date" content="2017-07-20">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="SharedResourcesBroker (gobblin-api 0.11.0 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../gobblin/broker/iface/SharedResourceKey.html" title="interface in gobblin.broker.iface"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../gobblin/broker/iface/SubscopedBrokerBuilder.html" title="interface in gobblin.broker.iface"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?gobblin/broker/iface/SharedResourcesBroker.html" target="_top">Frames</a></li>
<li><a href="SharedResourcesBroker.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">gobblin.broker.iface</div>
<h2 title="Interface SharedResourcesBroker" class="title">Interface SharedResourcesBroker&lt;S extends <a href="../../../gobblin/broker/iface/ScopeType.html" title="interface in gobblin.broker.iface">ScopeType</a>&lt;S&gt;&gt;</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>S</code> - the <a href="../../../gobblin/broker/iface/ScopeType.html" title="interface in gobblin.broker.iface"><code>ScopeType</code></a> tree used by this <a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="interface in gobblin.broker.iface"><code>SharedResourcesBroker</code></a>.</dd>
</dl>
<dl>
<dt>All Superinterfaces:</dt>
<dd><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a>, <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">SharedResourcesBroker&lt;S extends <a href="../../../gobblin/broker/iface/ScopeType.html" title="interface in gobblin.broker.iface">ScopeType</a>&lt;S&gt;&gt;</span>
extends <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></pre>
<div class="block">A class that provides access to objects shared by multiple components within a process, as well as objects virtually
shared among different processes (i.e. objects that synchronize with equivalent objects in other processes).
Different parts of an application may require objects that are ideally shared. For example, if multiple objects are
writing to the same file, it is convenient to have a single file handle. Instead of passing around all shared objects,
using static objects, or doing dependency injection, a <a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="interface in gobblin.broker.iface"><code>SharedResourcesBroker</code></a> provides a way to acquire such shared
objects as needed, letting the broker manage the lifecycle of the objects.
Objects are created using <a href="../../../gobblin/broker/iface/SharedResourceFactory.html" title="interface in gobblin.broker.iface"><code>SharedResourceFactory</code></a>s,
and are specific to a particular <a href="../../../gobblin/broker/iface/ScopeInstance.html" title="interface in gobblin.broker.iface"><code>ScopeInstance</code></a> and
<a href="../../../gobblin/broker/iface/SharedResourceKey.html" title="interface in gobblin.broker.iface"><code>SharedResourceKey</code></a>. <a href="../../../gobblin/broker/iface/ScopeInstance.html" title="interface in gobblin.broker.iface"><code>ScopeInstance</code></a>s represent a DAG of relevant scopes in the application, for example
GLOBAL -> JOB -> TASK. <a href="../../../gobblin/broker/iface/SharedResourceKey.html" title="interface in gobblin.broker.iface"><code>SharedResourceKey</code></a> identify different objects created by the same factory, for example
handles to different files could be keyed by the file path.
<a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="interface in gobblin.broker.iface"><code>SharedResourcesBroker</code></a> guarantees that multiple requests for objects with the same factory,
<a href="../../../gobblin/broker/iface/ScopeInstance.html" title="interface in gobblin.broker.iface"><code>ScopeInstance</code></a> and <a href="../../../gobblin/broker/iface/SharedResourceKey.html" title="interface in gobblin.broker.iface"><code>SharedResourceKey</code></a> return the same object, even if called for different <a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="interface in gobblin.broker.iface"><code>SharedResourcesBroker</code></a>
instances. This guarantee requires that new brokers are created using <a href="../../../gobblin/broker/iface/SharedResourcesBroker.html#newSubscopedBuilder-gobblin.broker.iface.ScopeInstance-"><code>newSubscopedBuilder(ScopeInstance)</code></a> only.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>&lt;T,K extends <a href="../../../gobblin/broker/iface/SharedResourceKey.html" title="interface in gobblin.broker.iface">SharedResourceKey</a>&gt;<br>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../gobblin/broker/iface/SharedResourcesBroker.html#bindSharedResourceAtScope-gobblin.broker.iface.SharedResourceFactory-K-S-T-">bindSharedResourceAtScope</a></span>(<a href="../../../gobblin/broker/iface/SharedResourceFactory.html" title="interface in gobblin.broker.iface">SharedResourceFactory</a>&lt;T,K,<a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="type parameter in SharedResourcesBroker">S</a>&gt;&nbsp;factory,
K&nbsp;key,
<a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="type parameter in SharedResourcesBroker">S</a>&nbsp;scopeType,
T&nbsp;instance)</code>
<div class="block">Bind an instance to the input factory, key, and scope.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../gobblin/broker/iface/SharedResourcesBroker.html#close--">close</a></span>()</code>
<div class="block">Close all resources at this and descendant scopes, meaning <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><code>Closeable</code></a>s will be closed and
<a href="http://google.github.io/guava/releases/15.0/api/docs/com/google/common/util/concurrent/Service.html?is-external=true" title="class or interface in com.google.common.util.concurrent"><code>Service</code></a>s will be shut down.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../gobblin/broker/iface/ScopeInstance.html" title="interface in gobblin.broker.iface">ScopeInstance</a>&lt;<a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="type parameter in SharedResourcesBroker">S</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../gobblin/broker/iface/SharedResourcesBroker.html#getScope-S-">getScope</a></span>(<a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="type parameter in SharedResourcesBroker">S</a>&nbsp;scopeType)</code>
<div class="block">Get the <a href="../../../gobblin/broker/iface/ScopeInstance.html" title="interface in gobblin.broker.iface"><code>ScopeInstance</code></a> in this brokers topology at the provided <a href="../../../gobblin/broker/iface/ScopeType.html" title="interface in gobblin.broker.iface"><code>ScopeType</code></a>.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>&lt;T,K extends <a href="../../../gobblin/broker/iface/SharedResourceKey.html" title="interface in gobblin.broker.iface">SharedResourceKey</a>&gt;<br>T</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../gobblin/broker/iface/SharedResourcesBroker.html#getSharedResource-gobblin.broker.iface.SharedResourceFactory-K-">getSharedResource</a></span>(<a href="../../../gobblin/broker/iface/SharedResourceFactory.html" title="interface in gobblin.broker.iface">SharedResourceFactory</a>&lt;T,K,<a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="type parameter in SharedResourcesBroker">S</a>&gt;&nbsp;factory,
K&nbsp;key)</code>
<div class="block">Get a shared resource created by the input <a href="../../../gobblin/broker/iface/SharedResourceFactory.html" title="interface in gobblin.broker.iface"><code>SharedResourceFactory</code></a>.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>&lt;T,K extends <a href="../../../gobblin/broker/iface/SharedResourceKey.html" title="interface in gobblin.broker.iface">SharedResourceKey</a>&gt;<br>T</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../gobblin/broker/iface/SharedResourcesBroker.html#getSharedResourceAtScope-gobblin.broker.iface.SharedResourceFactory-K-S-">getSharedResourceAtScope</a></span>(<a href="../../../gobblin/broker/iface/SharedResourceFactory.html" title="interface in gobblin.broker.iface">SharedResourceFactory</a>&lt;T,K,<a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="type parameter in SharedResourcesBroker">S</a>&gt;&nbsp;factory,
K&nbsp;key,
<a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="type parameter in SharedResourcesBroker">S</a>&nbsp;scopeType)</code>
<div class="block">Get a shared resource created by the input <a href="../../../gobblin/broker/iface/SharedResourceFactory.html" title="interface in gobblin.broker.iface"><code>SharedResourceFactory</code></a> at the <a href="../../../gobblin/broker/iface/ScopeInstance.html" title="interface in gobblin.broker.iface"><code>ScopeInstance</code></a>
returned by <code>#getScope)</code> on the input <a href="../../../gobblin/broker/iface/ScopeType.html" title="interface in gobblin.broker.iface"><code>ScopeType</code></a>.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="../../../gobblin/broker/iface/SubscopedBrokerBuilder.html" title="interface in gobblin.broker.iface">SubscopedBrokerBuilder</a>&lt;<a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="type parameter in SharedResourcesBroker">S</a>,?&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../gobblin/broker/iface/SharedResourcesBroker.html#newSubscopedBuilder-gobblin.broker.iface.ScopeInstance-">newSubscopedBuilder</a></span>(<a href="../../../gobblin/broker/iface/ScopeInstance.html" title="interface in gobblin.broker.iface">ScopeInstance</a>&lt;<a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="type parameter in SharedResourcesBroker">S</a>&gt;&nbsp;subscope)</code>
<div class="block">Get a builder to create a descendant <a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="interface in gobblin.broker.iface"><code>SharedResourcesBroker</code></a>.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="../../../gobblin/broker/iface/ScopeInstance.html" title="interface in gobblin.broker.iface">ScopeInstance</a>&lt;<a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="type parameter in SharedResourcesBroker">S</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../gobblin/broker/iface/SharedResourcesBroker.html#selfScope--">selfScope</a></span>()</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="selfScope--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>selfScope</h4>
<pre><a href="../../../gobblin/broker/iface/ScopeInstance.html" title="interface in gobblin.broker.iface">ScopeInstance</a>&lt;<a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="type parameter in SharedResourcesBroker">S</a>&gt;&nbsp;selfScope()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The lowest defined <a href="../../../gobblin/broker/iface/ScopeInstance.html" title="interface in gobblin.broker.iface"><code>ScopeInstance</code></a> in this <a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="interface in gobblin.broker.iface"><code>SharedResourcesBroker</code></a>.
This is provides the lowest <a href="../../../gobblin/broker/iface/ScopeType.html" title="interface in gobblin.broker.iface"><code>ScopeType</code></a> at which the <a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="interface in gobblin.broker.iface"><code>SharedResourcesBroker</code></a> can return shared objects.</dd>
</dl>
</li>
</ul>
<a name="getScope-gobblin.broker.iface.ScopeType-">
<!-- -->
</a><a name="getScope-S-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getScope</h4>
<pre><a href="../../../gobblin/broker/iface/ScopeInstance.html" title="interface in gobblin.broker.iface">ScopeInstance</a>&lt;<a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="type parameter in SharedResourcesBroker">S</a>&gt;&nbsp;getScope(<a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="type parameter in SharedResourcesBroker">S</a>&nbsp;scopeType)
throws <a href="../../../gobblin/broker/iface/NoSuchScopeException.html" title="class in gobblin.broker.iface">NoSuchScopeException</a></pre>
<div class="block">Get the <a href="../../../gobblin/broker/iface/ScopeInstance.html" title="interface in gobblin.broker.iface"><code>ScopeInstance</code></a> in this brokers topology at the provided <a href="../../../gobblin/broker/iface/ScopeType.html" title="interface in gobblin.broker.iface"><code>ScopeType</code></a>.</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../gobblin/broker/iface/NoSuchScopeException.html" title="class in gobblin.broker.iface">NoSuchScopeException</a></code> - if the input <a href="../../../gobblin/broker/iface/ScopeType.html" title="interface in gobblin.broker.iface"><code>ScopeType</code></a> is lower than that of <a href="../../../gobblin/broker/iface/SharedResourcesBroker.html#selfScope--"><code>selfScope()</code></a>.</dd>
</dl>
</li>
</ul>
<a name="getSharedResource-gobblin.broker.iface.SharedResourceFactory-gobblin.broker.iface.SharedResourceKey-">
<!-- -->
</a><a name="getSharedResource-gobblin.broker.iface.SharedResourceFactory-K-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSharedResource</h4>
<pre>&lt;T,K extends <a href="../../../gobblin/broker/iface/SharedResourceKey.html" title="interface in gobblin.broker.iface">SharedResourceKey</a>&gt;&nbsp;T&nbsp;getSharedResource(<a href="../../../gobblin/broker/iface/SharedResourceFactory.html" title="interface in gobblin.broker.iface">SharedResourceFactory</a>&lt;T,K,<a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="type parameter in SharedResourcesBroker">S</a>&gt;&nbsp;factory,
K&nbsp;key)
throws <a href="../../../gobblin/broker/iface/NotConfiguredException.html" title="class in gobblin.broker.iface">NotConfiguredException</a></pre>
<div class="block">Get a shared resource created by the input <a href="../../../gobblin/broker/iface/SharedResourceFactory.html" title="interface in gobblin.broker.iface"><code>SharedResourceFactory</code></a>. The resource will be shared
at least by all brokers with the same <a href="../../../gobblin/broker/iface/SharedResourcesBroker.html#selfScope--"><code>selfScope()</code></a>, but the factory may chose to create the resource
at a higher scope.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - type of object created by the factory.</dd>
<dd><code>K</code> - type of factory accepted by the factory.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>factory</code> - The <a href="../../../gobblin/broker/iface/SharedResourceFactory.html" title="interface in gobblin.broker.iface"><code>SharedResourceFactory</code></a> used to create the shared object.</dd>
<dd><code>key</code> - Identifies different objects from the same factory in the same <a href="../../../gobblin/broker/iface/ScopeInstance.html" title="interface in gobblin.broker.iface"><code>ScopeInstance</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an object of type T.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../gobblin/broker/iface/NotConfiguredException.html" title="class in gobblin.broker.iface">NotConfiguredException</a></code></dd>
</dl>
</li>
</ul>
<a name="getSharedResourceAtScope-gobblin.broker.iface.SharedResourceFactory-gobblin.broker.iface.SharedResourceKey-gobblin.broker.iface.ScopeType-">
<!-- -->
</a><a name="getSharedResourceAtScope-gobblin.broker.iface.SharedResourceFactory-K-S-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSharedResourceAtScope</h4>
<pre>&lt;T,K extends <a href="../../../gobblin/broker/iface/SharedResourceKey.html" title="interface in gobblin.broker.iface">SharedResourceKey</a>&gt;&nbsp;T&nbsp;getSharedResourceAtScope(<a href="../../../gobblin/broker/iface/SharedResourceFactory.html" title="interface in gobblin.broker.iface">SharedResourceFactory</a>&lt;T,K,<a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="type parameter in SharedResourcesBroker">S</a>&gt;&nbsp;factory,
K&nbsp;key,
<a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="type parameter in SharedResourcesBroker">S</a>&nbsp;scopeType)
throws <a href="../../../gobblin/broker/iface/NotConfiguredException.html" title="class in gobblin.broker.iface">NotConfiguredException</a>,
<a href="../../../gobblin/broker/iface/NoSuchScopeException.html" title="class in gobblin.broker.iface">NoSuchScopeException</a></pre>
<div class="block">Get a shared resource created by the input <a href="../../../gobblin/broker/iface/SharedResourceFactory.html" title="interface in gobblin.broker.iface"><code>SharedResourceFactory</code></a> at the <a href="../../../gobblin/broker/iface/ScopeInstance.html" title="interface in gobblin.broker.iface"><code>ScopeInstance</code></a>
returned by <code>#getScope)</code> on the input <a href="../../../gobblin/broker/iface/ScopeType.html" title="interface in gobblin.broker.iface"><code>ScopeType</code></a>.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - type of object created by the factory.</dd>
<dd><code>K</code> - type of factory accepted by the factory.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>factory</code> - The <a href="../../../gobblin/broker/iface/SharedResourceFactory.html" title="interface in gobblin.broker.iface"><code>SharedResourceFactory</code></a> used to create the shared object.</dd>
<dd><code>key</code> - Identifies different objects from the same factory in the same <a href="../../../gobblin/broker/iface/ScopeInstance.html" title="interface in gobblin.broker.iface"><code>ScopeInstance</code></a>.</dd>
<dd><code>scopeType</code> - <a href="../../../gobblin/broker/iface/ScopeType.html" title="interface in gobblin.broker.iface"><code>ScopeType</code></a> at which the object will be obtained.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an object of type T.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../gobblin/broker/iface/NotConfiguredException.html" title="class in gobblin.broker.iface">NotConfiguredException</a></code></dd>
<dd><code><a href="../../../gobblin/broker/iface/NoSuchScopeException.html" title="class in gobblin.broker.iface">NoSuchScopeException</a></code></dd>
</dl>
</li>
</ul>
<a name="bindSharedResourceAtScope-gobblin.broker.iface.SharedResourceFactory-gobblin.broker.iface.SharedResourceKey-gobblin.broker.iface.ScopeType-java.lang.Object-">
<!-- -->
</a><a name="bindSharedResourceAtScope-gobblin.broker.iface.SharedResourceFactory-K-S-T-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>bindSharedResourceAtScope</h4>
<pre>&lt;T,K extends <a href="../../../gobblin/broker/iface/SharedResourceKey.html" title="interface in gobblin.broker.iface">SharedResourceKey</a>&gt;&nbsp;void&nbsp;bindSharedResourceAtScope(<a href="../../../gobblin/broker/iface/SharedResourceFactory.html" title="interface in gobblin.broker.iface">SharedResourceFactory</a>&lt;T,K,<a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="type parameter in SharedResourcesBroker">S</a>&gt;&nbsp;factory,
K&nbsp;key,
<a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="type parameter in SharedResourcesBroker">S</a>&nbsp;scopeType,
T&nbsp;instance)
throws <a href="../../../gobblin/broker/iface/NoSuchScopeException.html" title="class in gobblin.broker.iface">NoSuchScopeException</a></pre>
<div class="block">Bind an instance to the input factory, key, and scope.</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - type of object created by the factory.</dd>
<dd><code>K</code> - type of factory accepted by the factory.</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>factory</code> - The <a href="../../../gobblin/broker/iface/SharedResourceFactory.html" title="interface in gobblin.broker.iface"><code>SharedResourceFactory</code></a> used to create the shared object.</dd>
<dd><code>key</code> - Identifies different objects from the same factory in the same <a href="../../../gobblin/broker/iface/ScopeInstance.html" title="interface in gobblin.broker.iface"><code>ScopeInstance</code></a>.</dd>
<dd><code>scopeType</code> - <a href="../../../gobblin/broker/iface/ScopeType.html" title="interface in gobblin.broker.iface"><code>ScopeType</code></a> at which the object will be obtained.</dd>
<dd><code>instance</code> - the instance to bind.</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="../../../gobblin/broker/iface/NoSuchScopeException.html" title="class in gobblin.broker.iface">NoSuchScopeException</a></code></dd>
</dl>
</li>
</ul>
<a name="close--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>close</h4>
<pre>void&nbsp;close()
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Close all resources at this and descendant scopes, meaning <a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io"><code>Closeable</code></a>s will be closed and
<a href="http://google.github.io/guava/releases/15.0/api/docs/com/google/common/util/concurrent/Service.html?is-external=true" title="class or interface in com.google.common.util.concurrent"><code>Service</code></a>s will be shut down. Future calls to get the same resource will
instantiate a new resource instead.
Best practice guideline: this method should only be called by the object who created the <a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="interface in gobblin.broker.iface"><code>SharedResourcesBroker</code></a>.
Objects or methods which received an already built <a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="interface in gobblin.broker.iface"><code>SharedResourcesBroker</code></a> should not call this method.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true#close--" title="class or interface in java.lang">close</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/7/docs/api/java/lang/AutoCloseable.html?is-external=true" title="class or interface in java.lang">AutoCloseable</a></code></dd>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true#close--" title="class or interface in java.io">close</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/Closeable.html?is-external=true" title="class or interface in java.io">Closeable</a></code></dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="newSubscopedBuilder-gobblin.broker.iface.ScopeInstance-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>newSubscopedBuilder</h4>
<pre><a href="../../../gobblin/broker/iface/SubscopedBrokerBuilder.html" title="interface in gobblin.broker.iface">SubscopedBrokerBuilder</a>&lt;<a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="type parameter in SharedResourcesBroker">S</a>,?&gt;&nbsp;newSubscopedBuilder(<a href="../../../gobblin/broker/iface/ScopeInstance.html" title="interface in gobblin.broker.iface">ScopeInstance</a>&lt;<a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="type parameter in SharedResourcesBroker">S</a>&gt;&nbsp;subscope)</pre>
<div class="block">Get a builder to create a descendant <a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="interface in gobblin.broker.iface"><code>SharedResourcesBroker</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>subscope</code> - the <a href="../../../gobblin/broker/iface/ScopeInstance.html" title="interface in gobblin.broker.iface"><code>ScopeInstance</code></a> of the new <a href="../../../gobblin/broker/iface/SharedResourcesBroker.html" title="interface in gobblin.broker.iface"><code>SharedResourcesBroker</code></a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a <a href="../../../gobblin/broker/iface/SubscopedBrokerBuilder.html" title="interface in gobblin.broker.iface"><code>SubscopedBrokerBuilder</code></a>.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-all.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../gobblin/broker/iface/SharedResourceKey.html" title="interface in gobblin.broker.iface"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../gobblin/broker/iface/SubscopedBrokerBuilder.html" title="interface in gobblin.broker.iface"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?gobblin/broker/iface/SharedResourcesBroker.html" target="_top">Frames</a></li>
<li><a href="SharedResourcesBroker.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>