4.13.2.1 PGXエンジンの起動と停止

アプリケーションからグラフ・サーバー(PGX)を起動するには、PGX構成の引数としてJSONオブジェクトを使用するinstance.startEngine()をコールします。

ノート:

PGXエンジンの停止

次のいずれかのAPIを使用して、PGXエンジンを停止できます。

instance.shutdownEngineNow(); // cancels pending tasks, throws exception if engine is not running
instance.shutdownEngineNowIfRunning(); // cancels pending tasks, only tries to shut down if engine is running
if (instance.shutdownEngine(30, TimeUnit.SECONDS) == false) { 
  // doesn't accept new tasks but finishes up remaining tasks
  // pending tasks didn't finish after 30 seconds
}

ノート:

PGXエンジンをシャットダウンすると、Apache Tomcatサーバーは存続しますが、新しいセッションは作成できません。また、現在のすべてのセッションおよびタスクが取り消され、終了します。