Caching the Application Engine Server 緩存應用程序引擎服務器

Caching the Application Engine Server

緩存應用程序引擎服務器

Application Engine caches metadata just like the application server. This caching enhances performance because a program can refer to the local cache for any objects that it uses.

應用程序引擎會像應用程序服務器一樣緩存元數據。這種緩存提高了性能,因為程序可以引用它所使用的任何對象的本地緩存。

Cache Directory Location

高速緩存目錄位置

Application Engine programs that run on a Microsoft Windows NT or UNIX server lock their own cache directory for the duration of a run. You find these directories under the master cache directory. The master directory is created under the directory specified by the CacheBaseDir variable in the PeopleSoft Process Scheduler configuration file. If all existing cache directories are locked, a new one is created. Cache subdirectories are named sequentially, starting at 1.

在Microsoft Windows NT或UNIX服務器上運行的應用程序引擎程序在運行期間鎖定自己的緩存目錄。您可以在主緩存目錄下找到這些目錄。主目錄是在PeopleSoft Process Scheduler配置文件中的CacheBaseDir變量指定的目錄下創建的。如果所有現有的緩存目錄都被鎖定,則會創建一個新的緩存目錄。緩存子目錄按順序命名,從1開始。

If you do not enter a fully qualified path for the CacheBaseDir variable, then Application Engine creates a cache directory within the directory in which the program is set to run.

如果沒有為CacheBaseDir變量輸入完全限定路徑,則應用程序引擎將在設置為運行程序的目錄中創建一個緩存目錄。

Note: Do not share the CacheBaseDir variable with application servers and do not use environment variables when specifying CacheBaseDir because the system does not resolve them. For example, do not set CacheBaseDir to $PS_CFG_HOME.

附注:不要與應用服務器共享CacheBaseDir變量,也不要在指定CacheBaseDir時使用環境變量,因為系統沒有解析它們。例如,不要將CacheBaseDir設置為$PS_CFG_HOME。

Cache Parameters

緩存參數

The PSPRCS.CFG (PS_SERVER_CFG) file has two additional cache parameters. They are:

PSPRCS.CFG(PS_SERVER_CFG)文件有兩個額外的緩存參數。它們是:


  • Enable Server Caching
  • 啟用服務器緩存
  • Server Cache Mode
  • 服務器緩存模式

Do not alter these settings from the delivered defaults. These settings are reserved for future use.

不要從傳遞的默認值更改這些設置。這些設置保留以備將來使用。

Freeing Locked Temporary Tables

釋放鎖定的臨時表

If you use dedicated temporary tables for Application Engine programs, then you might need to free, or unlock, a temporary table if the program running against it terminates abnormally. Because most Application Engine programs run through PeopleSoft Process Scheduler, typically you use Process Monitor to unlock the temporary tables. Deleting or restarting a process using Process Monitor automatically frees the locked temporary tables.

如果對應用程序引擎程序使用專用的臨時表,則在針對該臨時表運行的程序異常終止時,可能需要釋放或解鎖該臨時表。因為大多數應用程序引擎程序通過PeopleSoft進程計劃程序運行,所以通常使用進程監視器來解除對臨時表的鎖定。使用Process Monitor刪除或重新啟動進程會自動釋放鎖定的臨時表。

For the programs that you invoke outside of PeopleSoft Process Scheduler, use the Manage Abends page. Programs running outside of Process Scheduler include those invoked from CallAppEngine PeopleCode and the command line.

對于您在PeopleSoft Process Scheduler之外調用的程序,請使用Manage Abends頁面。在Process Scheduler之外運行的程序包括從CallAppEngine PeopleCode和命令行調用的程序。

To free locked temporary tables using the Manage Abends page:

要使用Manage A bend頁面釋放鎖定的臨時表,請執行以下操作:

  1. Select PeopleTools > Application Engine > Manage AE Abends..

選擇PeopleTools>應用程序引擎>管理AE異常

  1. Identify the program that has locked the temporary tables you want.

確定已鎖定所需臨時表的程序。

Use the process instance, run control ID, program name, user ID, and run date and time columns to uniquely identify programs.

使用流程實例、運行控件ID、程序名、用戶ID以及運行日期和時間列來唯一標識程序。

  1. Click the Temp Tables link.

單擊臨時表鏈接。

  1. On the Temporary Tables page, click the Release button to unlock the temporary tables associated with the program.

在“臨時表”頁上,單擊“釋放”按鈕以解鎖與程序關聯的臨時表。

Analyzing Application Engine Programs

分析應用程序引擎程序

Application Engine programs can be analyzed by using the associated temporary table data. You can retain temporary table data by enabling temporary table data tracing in PeopleSoft Configuration Manager.

可以使用關聯的臨時表數據來分析應用程序引擎程序。您可以通過在PeopleSoft Configuration Manager中啟用臨時表數據跟蹤來保留臨時表數據。

See Enabling Application Engine Tracing
請參閱啟用應用程序引擎跟蹤

Use AET Analyzer tool to analyze and view the results.

使用AET分析器工具來分析和查看結果。

This example illustrates the fields and controls on the Filter Option in Log Analyzer.

此示例說明了日志分析器中的篩選器選項上的字段和控件。

In the AET Analyzer tool, filter out the Application Engine steps with temporary table using the Temp Table option, and analyze.

在aet analyzer工具中,使用temp table選項過濾出帶有臨時表的應用程序引擎步驟,并進行分析。

To filter:

要過濾:

  1. In AET Analyzer tool, open the AET file.

在AET分析器工具中,打開AET文件。

  1. Load the corresponding temporary table.

加載相應的臨時表。

Note: After the temp table file is loaded, the Include All Tables check box is enabled.

注意:加載臨時表文件后,啟用“包括所有表”復選框。

  1. Ensure that Include All Tables check box is cleared.

確保清除“包括所有表”復選框。

  1. Select Apply Filter to display only AE steps with temporary table.

選擇應用過濾器僅顯示帶有臨時表的AE步驟。

  1. You can further filter the AE steps with temporary table based on a SQL action by selecting the desired action from the SQL View Options group box.

通過從SQL View Options組框中選擇所需的操作,可以根據SQL操作使用臨時表進一步過濾AE步驟。

  1. Highlight the AE step that you want to view and analyze, and click Diff Temp Table button.

突出顯示要查看和分析的AE步驟,然后單擊"差異溫度表"按鈕。

The result displays the modification done to temporary table data.

結果顯示對臨時表數據所做的修改。

Configuring Application Engine Action Plug-ins

配置應用程序引擎操作插件

PeopleTools allows you to configure an Application Engine action plug-in to alter the SQL or PeopleCode actions of any Application Engine.

PeopleTools允許您配置一個應用程序引擎操作插件來改變任何應用程序引擎的SQL或PeopleCode操作。

The configured plug-in action is executed at runtime. This effectively allows you to modify the code without actually customizing or re-designing the Application Engine program.

配置的插件動作在運行時執行。這實際上允許您修改代碼,而無需實際自定義或重新設計應用程序引擎程序。

Configure the selected SQL or PeopleCode action of the Application Engine program by adding new SQL, PeopleCode, or both and/or by replacing the existing SQL or PeopleCode action through PIA in the AE Action Plugin page (PeopleTools, Application Engine).

配置應用程序引擎程序的選定SQL或PeopleCode操作,方法是在AE操作插件頁面(PeopleTools,應用程序引擎)中添加新SQL、PeopleCode或兩者,和/或通過PIA替換現有SQL或PeopleCode操作。

Note: You can add or replace only SQL and PeopleCode actions in the Application Engine program. Only sections with steps having SQL or PeopleCode actions of the Application Engine program, which you plan to configure, will be displayed in PIA. This feature is not designed to add new sections or steps to an existing Application Engine program.

注意:您只能在應用程序引擎程序中添加或替換SQL和PeopleCode操作。只有包含您計劃配置的Application Engine程序的SQL或PeopleCode操作的步驟的部分才會顯示在PIA中。此功能不是為向現有應用程序引擎程序添加新部分或步驟而設計的。

Actions belonging to the same step of the same section of the Application Engine program can have multiple plug-in actions defined. The plug-in action type does not have to match the action type that is selected for configuration. You can re-use the same SQL or PeopleCode plug-in action multiple times for different Application Engine programs.

屬于Application Engine程序的同一部分的同一步驟的操作可以定義多個插件操作。插件操作類型不必與為配置選擇的操作類型匹配。您可以重復使用為不同的應用程序引擎程序多次執行相同的SQL或PeopleCode插件操作。


The Application Engine action that is being configured cannot be used as a plug-in to configure another Application Engine program. Also, you cannot define a plug-in for the Application Engine action that is already been used as a plug-in.

正在配置的應用程序引擎操作不能用作插件來配置另一個應用程序引擎程序。此外,不能為已經用作插件的Application Engine操作定義插件。

For example, if Application Engine program A action Y is configured to use Application Engine program B action X as a plug-in, then Application Engine program A action Y cannot be used as a plug-in for any other Application Engine program. Also, you cannot configure a plug-in for Application Engine program B action X.

例如,如果應用程序引擎程序A操作Y配置為將應用程序引擎程序B操作X用作插件,則應用程序引擎程序一個動作Y不能用作任何其他應用程序引擎程序的插件。此外,不能為應用程序引擎程序B操作X配置插件。

Ensure that information such as state records, temporary tables, PeopleCode variables that are required by the plugged-in action is made available from the configured Application Engine program.

確保諸如狀態記錄、臨時表、PeopleCode變量之類的信息可以從配置好的Application Engine程序中獲得。

To add new Application Engine plug-in actions:

要添加新的Application Engine插件操作,請執行以下操作:

  1. In Application Designer, identify an existing or create a new Application Engine program with the SQL or PeopleCode actions that you want to use to configure the SQL or PeopleCode actions of any Application Engine program.

在“應用程序設計器”中,使用要用于配置任何應用程序引擎程序的SQL或PeopleCode操作的SQL或PeopleCode操作來標識現有的應用程序引擎程序或創建新的應用程序引擎程序。

To create an Application Engine program, see Creating, Opening, and Renaming Programs

若要創建應用程序引擎程序,請參見創建、打開和重命名程序

  1. In the PIA, open AE Action Plugin page by selecting PeopleTools > Application Engine > AE Action Plugins.

在PIA中,通過選擇PeopleTools>應用引擎>AE Action Plugins來打開AE Action Plugin頁面。

  1. Choose the Application Engine program that you want to configure by plugging-in the desired SQL or PeopleCode actions from the newly created Application Engine program.

通過從新創建的應用程序引擎程序中插入所需的SQL或PeopleCode操作,選擇要配置的應用程序引擎程序。

See the subsequent Configuration Options section for details.

有關詳細信息,請參閱后續的配置選項部分。

  1. Verify the configured Application Engine program in Application Designer to know the impact of the plug-ins.

在應用程序設計器中驗證已配置的應用程序引擎程序,以了解插件的影響。

You can identify the configured SQL or PeopleCode action by a red flash on its icon.

您可以通過其圖標上的紅色閃光來識別配置的SQL或PeopleCode操作。

This image shows the configured SQL action with a red flash. On the code pane, the additional code is highlighted in blue, code being replaced is in strikeout, and the replacement code in red. The codes are displayed based on the order of execution defined in the PIA.

此圖像顯示了配置的SQL操作,并顯示了紅色閃光。在“代碼”窗格上,附加代碼以藍色突出顯示,被替換的代碼以刪除線顯示,替換代碼以紅色突出顯示。代碼是根據PIA中定義的執行順序顯示的。

Note: You can use the %AECallerApplId system variable to identify the name of the Application Engine program that executed a plug-in action or a call section to the currently executing program. For more details, see “%AECallerApplId” (PeopleCode Language Reference)

On-Exit Application Engine Plug-in

出口應用引擎插件

PeopleTools allows you to configure an On-Exit Application Engine plug-in at the end of an Application Engine program. This enables the Application Engine program to run and exit based on the conditions defined for the On-Exit Application Engine plug-in.

PeopleTools允許您在應用程序引擎程序結束時配置On-Exit應用程序引擎插件。這使Application Engine程序能夠根據為On-Exit Application Engine插件定義的條件運行和退出。

On the PIA, you can specify which section, step, SQL or PeopleCode action should run on-exit from an Application Engine program.

在PIA上,您可以指定從應用程序引擎程序退出時應該運行哪個部分、步驟、SQL或PeopleCode操作。

Note: On-Exit plug-ins can be configured for any existing Application Engine programs.

注意:可以為任何現有的應用程序引擎程序配置On-Exit插件。

You can verify the configured On-Exit Application Engine plug-in in the Application Designer.

您可以在應用程序設計器中驗證已配置的On-Exit應用程序引擎插件。

This example shows an On-Exit Application Engine plug-in configured in the Application Designer.

此示例顯示在應用程序設計器中配置的On-Exit應用程序引擎插件。

Configuration Options

配置選項

Use the AE Action Plugin page to configure Application Engine action plug-in and On-Exit Application Engine plug-in.

使用AE操作插件頁面配置應用程序引擎操作插件和On-Exit應用程序引擎插件。

This example illustrates the fields and controls on the AE Action Plugin page. You can find definitions for the fields and controls later on this page.

本示例說明了AE操作插件頁面上的字段和控件。您可以在本頁稍后找到字段和控件的定義。

Use these configuration options to configure a delivered Application Engine program:

Field or Control

Description

Enabled

Select this check box to enable the configuration.

Field or Control

Description

Section

Select a section of the delivered Application Engine program,? which you plan to configure. Only sections with steps having SQL or PeopleCode are listed.

Step

Select a step of the chosen section. Only steps that have SQL or PeopleCode actions are listed.

Action

Select an action from the chosen step.

Plugin Name

Select the new Application Engine program that contains the new SQL or PeopleCode action, which will be used to configure the delivered Application Engine program.

Section

Select the required section from the new Application Engine program.

Step

Select the required step from the selected section.

Action

Select the SQL or PeopleCode action from the selected step to add before or after the existing action, or to replace the existing action.

Mode

The three modes that decide the execution order of the configured Application Engine action:

  • Before - Execute the new Application Engine action before the existing action.
  • After - Execute the new Application Engine action after the existing action.
  • Replace - Execute the new Application Engine action instead of the existing action.

Order within Mode

This field is required if the same action belonging to the same step of the same section of the configured Application Engine program has multiple plug-ins using the same mode. The value entered in this field decides the sequence in which the actions within the mode run during execution.

Description

(Optional) Descriptive notes.

Use these configuration options to configure On-Exit Application Engine plug-in:

Field or Control

Description

Enabled

Select this check box to enable the On-Exit plug-in configuration.

Plugin Name

Select the On-Exit Application Engine plug-in.

Section

Select a section of the On-Exit Application Engine plug-in that you plan to run.

Step

Select a step of the selected section.

Action Type

Select an action of the selected step.

<Exit Conditions>

These are the exit conditions:

  • On Success
  • On Skip Step
  • On Break
  • On Abort
  • On Skip

The On-Exit Application Engine plug-in runs based on the exit condition defined in the Application Engine program.

For example, for an Application Engine program, if you set the

On-Exit plug-in to run for the On-Break exit condition, the

On-Exit plug-in runs when the last action executed before the Application Engine program exited was a SQL or PeopleCode action that issued a Break condition.

See documentation for SQL and PeopleCode actions.

See Using PeopleCode in Application Engine Programs

Note: At least one of the exit conditions must be selected.

?Otherwise, an error is displayed while saving.

Note: In the PIA, the Actions Plugin grid gets disabled if the selected Application Engine program does not have SQL or PeopleCode actions, and a message is displayed stating that only On-Exit plug-ins can be configured.

Performance

性能

Sometimes plug-in changes may not be immediately recognized. It might take at most ten minutes for the changes to be recognized.

有時插件更改可能無法立即識別。可能最多需要10分鐘才能識別更改。

The processes where it takes time for the plug-in changes to come in effect are:

插件更改生效需要時間的流程如下:

  • When an active application server is running CallAppEngine() PeopleCode.
  • 當活動應用服務器運行CallAppEngine()PeopleCode時。
  • When viewing an Application Engine Program Flow view in an active Application Designer session.
  • 在活動的應用程序設計器會話中查看應用程序引擎程序流視圖時。
  • When an Application Engine program begins processing before the plug-in change is initiated.
  • 當應用程序引擎程序在插件更改啟動前開始處理時。

Note that there cases where plug-in changes are immediately recognized, and those are:

請注意,在某些情況下,插件更改會立即被識別,這些情況是:

  • While stopping and restarting any one process from the above set of processes.
  • 同時停止和重新啟動上述進程集中的任何一個進程。
  • When an Application Engine program is run through the Process Scheduler.

當應用程序引擎程序通過進程調度器運行時。

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/214826.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/214826.shtml
英文地址,請注明出處:http://en.pswp.cn/news/214826.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

科技云報道:從數據到生成式AI,是該重新思考風險的時候了

科技云報道原創。 OpenAI“宮斗”大戲即將塵埃落定。 自首席執行官Sam Altman突然被董事會宣布遭解雇、董事長兼總裁Greg Brockman辭職&#xff1b;緊接著OpenAI員工以辭職威脅董事會要求Altman回歸&#xff1b;再到OpenAI董事會更換成員、Altman回歸OpenAI。 表面上看&…

深入解析Java中的String:特點、重要方法及源碼分析

Java的String類是Java語言中最常用的類之一。 作為一位Java高級工程師&#xff0c;了解String類的特性和方法對于編寫高效和優化的Java代碼至關重要。在這篇技術博客中&#xff0c;我們將深入探討String類的特點&#xff0c;介紹其中一些重要的方法&#xff0c;并分析其源碼以獲…

java--LocalDate、LocalTime、LocalDateTime、ZoneId、Instant

1.為什么要學習JDK8新增的時間 LocalDate&#xff1a;代表本地日期(年、月、日、星期) LocalTime&#xff1a;代表本地時間(時、分、秒、納秒) LocalDateTime&#xff1a;代表本地日期、時間(年、月、日、星期、時、分、秒、納秒) 它們獲取對象的方案 2.LocalDate的常用API(…

Android的開機logo生成

生成可用的uboot和kernel的logo圖片 可以通過命令轉換BMP格式的圖片 ### 將 png 轉為顏色深度為8bit的的bmp圖片。jpeg使用jpegtopnm ### pngtopnm logo.png | ppmquant 31 | ppmtobmp -bpp 8 > logo.bmp然后就可以使用新圖替換舊圖片&#xff0c;在kernel目錄下的logo.bmp…

【精選】 VulnHub (超詳細解題過程)

&#x1f36c; 博主介紹&#x1f468;?&#x1f393; 博主介紹&#xff1a;大家好&#xff0c;我是 hacker-routing &#xff0c;很高興認識大家~ ?主攻領域&#xff1a;【滲透領域】【應急響應】 【python】 【VulnHub靶場復現】【面試分析】 &#x1f389;點贊?評論?收藏…

C# 任務的異常和延續處理

寫在前面 當Task在執行過程中出現異常或被取消等例外的情況時&#xff0c;為了讓執行流程能夠繼續進行&#xff0c;可以使用延續方法實現這種鏈式處理&#xff1b;還可以針對前置任務不同的執行結果&#xff0c;選擇執行不同的延續分支方法。子任務執行過程中的任何異常都會被…

線程安全的哈希表ConcurrentHashMap

1. HashTable 不推薦使用&#xff0c;無腦給各種方法加鎖 2.ConcurrentHashMap 多線程下推薦使用 鎖粒度控制 HashTable直接在方法上加synchronized&#xff0c;相當于對哈希表對象加鎖&#xff0c;一個哈希表只有一把鎖。多線程環境下&#xff0c;無論線程如何操作哈希表…

深入理解Dubbo-3.高級功能剖析和原理解析

&#x1f44f;作者簡介&#xff1a;大家好&#xff0c;我是愛吃芝士的土豆倪&#xff0c;24屆校招生Java選手&#xff0c;很高興認識大家&#x1f4d5;系列專欄&#xff1a;Spring源碼、JUC源碼、Kafka原理、分布式技術原理&#x1f525;如果感覺博主的文章還不錯的話&#xff…

利用貝葉斯超參數優化,提升模型效果更科學(附Python代碼)

超參數優化在大多數機器學習流水線中已成為必不可少的一步&#xff0c;而貝葉斯優化則是最為廣為人知的一種“學習”超參數優化方法。 超參數優化的任務旨在幫助選擇學習算法中成本&#xff08;或目標&#xff09;函數的一組最佳參數。這些參數可以是數據驅動的&#xff08;例…

【UE5】初識MetaHuman 創建虛擬角色

步驟 在UE5工程中啟用“Quixel Bridge”插件 打開“Quixel Bridge” 點擊“MetaHumans-》MetaHuman Presets UE5” 點擊“START MHC” 在彈出的網頁中選擇一個虛幻引擎版本&#xff0c;然后點擊“啟動 MetaHuman Creator” 等待一段時間后&#xff0c;在如下頁面點擊選擇一個人…

Apipost版IDEA插件:Apipost-Helper

Apipost-Helper是由Apipost推出的IDEA插件&#xff0c;寫完接口可以進行快速調試&#xff0c;且支持搜索接口、根據method跳轉接口&#xff0c;還支持生成標準的API文檔&#xff0c;注意&#xff1a;這些操作都可以在代碼編輯器內獨立完成&#xff0c;非常好用&#xff01;這里…

Tair(2):Tair安裝部署

1 安裝相關依賴庫 yum install -y gcc gcc-c make m4 libtool boost-devel zlib-devel openssl-devel libcurl-devel yum&#xff1a;是yellowdog updater modified 的縮寫&#xff0c;Linux中的包管理工具gcc&#xff1a;一開始稱為GNU C Compiler&#xff0c;也就是一個C編…

N皇后,回溯【java】

問題描述 八皇后問題是十九世紀著名的數學家高斯于1850年提出的。 問題是&#xff1a;在88的棋盤上擺放八個皇后&#xff0c;使其不能互相攻擊&#xff0c;即任意兩個皇后都不能處于同一行、同一列或同一斜線上。可以把八皇后問題擴展到n皇后問題&#xff0c;即在nn的棋盤上擺…

管理類聯考——數學——真題篇——按知識分類——幾何

文章目錄 2023真題(2023-07)-幾何-解析幾何-最值真題(2023-10)-幾何-立體幾何-正方體:體積: V = a 3 V=a^3 V

AX和A(T)X的區別是?

目錄 1.快速了解的例子&#xff1a; &#xff08;1&#xff09;假設所有節點的初始特征都是[1, 0, 0] &#xff0c;那么AX的結果是&#xff1a; &#xff08;2&#xff09; 的結果是&#xff1a; (3) 總結&#xff1a; 2.計算結構系數的例子 &#xff08;1&#xff09…

day45-46-Vue+ElementUI實現學生管理

VueElementUI實現學生管理 代碼&#xff1a; qiushiju/java2313_vue_elementui_crud (gitee.com) 一、思考 考慮需求&#xff08;登錄&#xff0c;查詢全部&#xff0c;基本增刪改查&#xff0c;分頁&#xff0c;搜索&#xff0c;批量&#xff09; 設計數據庫搭建項目 后端…

2024美賽備戰2--模型建立(*****必看****)

建模 美賽涉及的建模知識范圍非常廣且深&#xff0c;縱觀美賽真題不難發現&#xff0c;很多的模型 都是讀研或者讀博的時候才會真正深入開始研究&#xff0c;因此&#xff0c;對于做建模的同學來說&#xff0c; 是無法在賽前吃透大量模型的。推薦本科生分兩個步驟去有效準備比賽…

【S32DS RTD實戰】-1.3-S32K3工程生成S19,BIN,Hex文件,以及Post-build steps的妙用

目錄 1 方法一&#xff1a;逐個生成Motorola S-record&#xff08;s19&#xff0c;srec…&#xff09;&#xff0c;Intel HEX&#xff0c;Bin文件 1.1 生成Motorola S-record&#xff08;s19&#xff0c;srec…&#xff09;文件 1.2 生成Intel HEX文件 1.3 生成Bin文件 2 …

python的Streamlit庫的text_input組件

text_input 常用的輸入組件&#xff0c;這里注意記錄一下具體的參數&#xff0c;方便使用 函數簽名 st.text_input(label, value"", max_charsNone, keyNone, type"default", helpNone, autocompleteNone, on_changeNone, argsNone, kwargsNone, *, pla…

【LeetCode】414. 第三大的數

414. 第三大的數 難度&#xff1a;簡單 題目 給你一個非空數組&#xff0c;返回此數組中 第三大的數 。如果不存在&#xff0c;則返回數組中最大的數。 示例 1&#xff1a; 輸入&#xff1a;[3, 2, 1] 輸出&#xff1a;1 解釋&#xff1a;第三大的數是 1 。示例 2&#xf…