Files
doc-exports/docs/fg/umn/functiongraph_01_0418.html
liusiying01 904c1aad8b FG UMN 20250526 version
Reviewed-by: Mützel, Andrea <andrea.muetzel@t-systems.com>
Co-authored-by: liusiying01 <liusiying@huawei.com>
Co-committed-by: liusiying01 <liusiying@huawei.com>
2025-10-06 15:14:20 +00:00

39 lines
6.5 KiB
HTML

<a name="functiongraph_01_0418"></a><a name="functiongraph_01_0418"></a>
<h1 class="topictitle1">Configuring Class Isolation and Pre-stop for Java Functions</h1>
<div id="body8662426"><p id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_p77394272814">Class isolation is used to load your code and dependencies using an independent class loader if they conflict with the runtime dependencies.</p>
<p id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_p1236183681012">Pre-stop is used to call a callback function before FunctionGraph stops the current function instance.</p>
<div class="section" id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_section1373033117121"><h4 class="sectiontitle">Constraints</h4><p id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_p10714335181214">Only Java functions can be configured with class isolation and pre-stop.</p>
</div>
<div class="section" id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_section9133240175318"><h4 class="sectiontitle">Configuring Class Isolation for a Java Function</h4><ol id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_ol1647754716518"><li id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_li2047764712517">Log in to the FunctionGraph console. In the navigation pane, choose <strong id="functiongraph_01_0418__en-us_topic_0000002327631001_b47494187328">Functions</strong> &gt; <strong id="functiongraph_01_0418__en-us_topic_0000002327631001_b197496188321">Function List</strong>.</li><li id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_li16613123914216">Click the name of a function.</li><li id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_li0613203916420">Choose <strong id="functiongraph_01_0418__en-us_topic_0000002327631001_b524495073316">Configuration</strong> &gt; <strong id="functiongraph_01_0418__en-us_topic_0000002327631001_b132451550123316">Advanced Settings</strong>.</li><li id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_li1847784735113">Enable <strong id="functiongraph_01_0418__en-us_topic_0000002327631001_b1130341720346">Class Isolation</strong> and click <strong id="functiongraph_01_0418__en-us_topic_0000002327631001_b16641181919349">Save</strong>.</li></ol>
</div>
<div class="section" id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_section145551952125419"><h4 class="sectiontitle">Configuring Pre-stop for a Java Function</h4><ol id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_ol9624164514541"><li id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_li18181842105713">Log in to the FunctionGraph console. In the navigation pane, choose <strong id="functiongraph_01_0418__en-us_topic_0000002327631001_b151804188583">Functions</strong> &gt; <strong id="functiongraph_01_0418__en-us_topic_0000002327631001_b1180151835818">Function List</strong>.</li><li id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_li4182144245714">Click the name of a function.</li><li id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_li3182104218575">On the <strong id="functiongraph_01_0418__en-us_topic_0000002327631001_b543521463614">Configuration</strong> tab, click <strong id="functiongraph_01_0418__en-us_topic_0000002327631001_b1337193016364">Lifecycle</strong>.</li><li id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_li1462454515545">Enable <strong id="functiongraph_01_0418__en-us_topic_0000002327631001_b69251248153612">Pre-stop</strong> and set the related parameters.
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_table106243450541" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Pre-stop configuration</caption><thead align="left"><tr id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_row126239450547"><th align="left" class="cellrowborder" valign="top" width="33.46%" id="mcps1.3.5.2.4.2.2.3.1.1"><p id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_p176236454542">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="66.53999999999999%" id="mcps1.3.5.2.4.2.2.3.1.2"><p id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_p11623104505416">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_row7624144514546"><td class="cellrowborder" valign="top" width="33.46%" headers="mcps1.3.5.2.4.2.2.3.1.1 "><p id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_p6623145185410">Pre-stop Timeout (s)</p>
</td>
<td class="cellrowborder" valign="top" width="66.53999999999999%" headers="mcps1.3.5.2.4.2.2.3.1.2 "><p id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_p662310450549">Timeout for executing the callback function before the current function instance is stopped. The value is an integer ranging from 1 to 90.</p>
</td>
</tr>
<tr id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_row13624124512543"><td class="cellrowborder" valign="top" width="33.46%" headers="mcps1.3.5.2.4.2.2.3.1.1 "><p id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_p1262434525416">Pre-stop Handler</p>
</td>
<td class="cellrowborder" valign="top" width="66.53999999999999%" headers="mcps1.3.5.2.4.2.2.3.1.2 "><p id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_p1562417459549">Handler of the callback function, which can contain a maximum of 128 characters in the format of "[package name].[class name].[execution function name]".</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="functiongraph_01_0418__en-us_topic_0000002327631001_en-us_topic_0000002176748269_li13975548508">Click <strong id="functiongraph_01_0418__en-us_topic_0000002327631001_b93982499381">Save</strong>.</li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="functiongraph_01_0300.html">Configuring Functions</a></div>
</div>
</div>