own
永続性サービスのミューテックス オブジェクトでアドバイザリ ロックの所有権を確認する
説明
例
アドバイザリ ロックを所有しているかどうかの確認
まず、永続性サービス コントローラー オブジェクトを作成し、そのオブジェクトを使用して永続性サービスを開始します。
ctrl = mps.cache.control('myRedisConnection','Redis','Port',4519); start(ctrl)
接続名を使用して、永続性サービスのミューテックスを作成します。
lk = mps.sync.mutex('myDbLock','Connection','myRedisConnection')
アドバイザリ ロックを所有しているかどうかを確認します。
TF = own(lk)
TF = logical 0
入力引数
lk
— ミューテックス オブジェクト
永続性サービスのミューテックス オブジェクト
永続性サービス固有のミューテックス オブジェクト。永続性プロバイダーとして Redis™ を使用している場合、lk
は mps.sync.TimedRedisMutex
オブジェクトになります。永続性プロバイダーとして MATLAB® を使用している場合、lk
は mps.sync.TimedMATFileMutex
オブジェクトになります。
出力引数
TF
— logical 値
logical 配列
TF
には、永続性サービスのミューテックスでアドバイザリ ロックを所有している場合は logical 1 (true)
が含まれ、それ以外の場合は logical 0 (false)
が含まれます。
バージョン履歴
R2018b で導入
参考
mps.sync.mutex
| acquire
| release
| mps.sync.TimedRedisMutex
| mps.sync.TimedMATFileMutex
トピック
- データのキャッシュの基礎 (MATLAB Production Server)
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)