検索クエリーを入力してください
<book_title> を検索 ...
Cluster Server 7.3.1 エージェント開発者ガイド - AIX、Linux、Solaris、Windows
Last Published:
2018-01-17
Product(s):
InfoScale & Storage Foundation (7.3.1)
- 概要
- エージェントのエントリポイントの概要
- エージェントのエントリポイントについて
- エージェントエントリポイントの説明
- action エントリポイントについて
- info エントリポイントについて
- C++ またはスクリプトエントリポイントの使用上の注意事項
- エージェント情報ファイルについて
- ArgList 属性と ArgListValues 属性について
- C++ でのエントリポイントの作成
- C++ でのエントリポイントの作成について
- C++ のエントリポイントの構文
- エージェントフレームワークの基本関数
- コンテナサポートのためのエージェントフレームワーク基本関数
- スクリプトでのエントリポイントの作成
- スクリプトでのエントリポイントの作成について
- スクリプトエントリポイントの構文
- エージェントフレームワークの基本関数
- VCSAG_GET_ATTR_VALUE
- コンテナをサポートするエージェントフレームワーク基本関数
- スクリプトのエントリポイントの例
- エージェントメッセージのログ
- カスタムエージェントの作成
- スクリプトベースの IMF 対応カスタムエージェントの作成
- エージェントのテスト
- 静的タイプ属性
- 静的属性について
- 静的タイプ属性の定義
- AdvDbg
- ArgList
- 状態の遷移図
- 国際化されたメッセージ
- First Failure Data Capture(FFDC)を使用した VCS リソースの予期しない動作のトラブルシューティング
- 付録 A. 5.0 より前の VCS エージェントの使用
VCSAgSetCookie2
void *VCSAgSetCookie2(const char *name, void *cookie)
この基本関数は、void *cookie パラメータで指定された cookie をエージェントフレームワークが格納することを要求します。その cookie にすでに関連付けられている値がある場合、基本関数は新しい値を設定し、古い値を返します。この cookie と関連付けられた値がない場合、cookie に新しい値を設定し、NULL を返します。
この値は、エージェントフレームワークに対して透過的なもので、基本関数 VCSAgGetCookie() を呼び出すことによって取得できます。cookie が永続的に格納されるわけではありません。エージェント処理の終了時に失われます。この基本関数は任意のエントリポイントから実行することが可能です。次に例を示します。
#include "VCSAgApi.h" ... // Assume that the online, offline, and monitor // operations on resource require a certain key. Also // assume that obtaining this key is time consuming, but // that it can be reused until this process is // terminated. // // In this example, the open entry point obtains the key // and stores it as a cookie. Subsequent online, // offline, and monitor entry points get the cookie and // use the key. // // Note that the cookie name can be any unique string. // This example uses the resource name as the cookie // name. // void *get_key() { ... } void res_open(const char *res_name, void **attr_val) { if (VCSAgGetCookie(res_name) == NULL) { void *key = get_key(); VCSAgSetCookie2(res_name, key); } } VCSAgResState res_monitor(const char *res_name, void **attr_val, int *conf_level_ptr) { VCSAgResState state = VCSAgResUnknown; *conf_level_ptr = 0; void *key = VCSAgGetCookie(res_name); if (key == NULL) { // Take care of the rare cases when // the open entry point failed to // obtain the key and set the the cookie. key = get_key(); VCSAgSetCookie2(res_name, key); } // Use the key for testing if the resource is // online, and set the state accordingly. ... return state; }