microsoftgraph / microsoftgraph/msgraph-sdk-java
Is GraphServiceClient threadsafe?
まだ誰も着手していません。
- 主要言語
- Java
- スター
- 444
- フォーク
- 154
- 平均マージ
- 18時間 28分
- マージ済み PR(30日)
- 4
説明
Hi,
I am using msgraph sdk to get 'User' details in an application. Initialized the GraphServiceClient for app-only authentication as specified in the tutorial: https://learn.microsoft.com/en-us/graph/tutorials/java-app-only?tabs=aad&tutorial-step=3.
I want to query the 'users' using certain filter and select criteria, e.g.
_appClient.users().get(requestConfig -> {
requestConfig.queryParameters.filter = "displayName startsWith \'A\'";
requestConfig.queryParameters.select = new String[] { "displayName", "id", "mail" };
requestConfig.queryParameters.top = 25;
requestConfig.queryParameters.orderby = new String[] { "displayName" };
});
However, this request may happen from the context of different threads.
My queries are:
- Does each thread need to instantiate GraphServiceClient separately, or, can we initialize once and share across threads?
- If _appClient (i.e the instance of GraphServiceClient) can be shared, is it thread-safe or do we need to synchronize access to it?
Any insight will be helpful.
The following artifact versions are used: microsoft-graph (v 6.20.0) and azure-identity (1.14.1).
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
リンクされている Microsoft Graph Java app-only チュートリアルと、microsoft-graph 6.20.0 および azure-identity 1.14.1 に関連する GraphServiceClient の使用方法から始めます。複数のスレッド間で 1 つのインスタンスを共有することについての指針を得るため、リポジトリのドキュメントとクライアント実装を確認します。共有がサポートされているかどうか、また呼び出し元が同期を必要とするかどうかが明確に文書化されていれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- api
- issue の種類
- ドキュメント
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 静か
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100