クラス SessionAwareMethodInterceptor<D,C>

java.lang.ObjectSE
org.springframework.data.mongodb.SessionAwareMethodInterceptor<D,C>
型パラメーター:
D - 実際の Mongo データベースの型。
C - 実際の Mongo コレクションの型。
実装済みのインターフェース一覧:
Advice, Interceptor, MethodInterceptor

public class SessionAwareMethodInterceptor<D,C> extends ObjectSE implements MethodInterceptor
MethodInterceptor 実装は、最初の引数として ClientSession を持つ代替ターゲットメソッドを検索して呼び出します。これにより、既存のコードベースとのシームレスな統合が可能になります。
MethodInterceptor は、MongoCollection 上のメソッドを認識しており、そのメソッドは、MongoCollection.withWriteConcern(WriteConcern) のように自身の新しいインスタンスを返す可能性があり、まだプロキシされていない場合はそれらを装飾します。
導入:
2.1
作成者:
Christoph Strobl, Mark Paluch
  • コンストラクターの詳細

    • SessionAwareMethodInterceptor

      public <T> SessionAwareMethodInterceptor(com.mongodb.session.ClientSession session, T target, ClassSE<?> clientType, ClassSE<? extends com.mongodb.session.ClientSession> sessionType, ClassSE<D> databaseType, SessionAwareMethodInterceptor.ClientSessionOperator<D> databaseDecorator, ClassSE<C> collectionType, SessionAwareMethodInterceptor.ClientSessionOperator<C> collectionDecorator)
      指定されたターゲットに対して新しい SessionAwareMethodInterceptor を作成します。
      型パラメーター:
      T - ターゲットオブジェクト型。
      パラメーター:
      session - 呼び出し時に使用される ClientSession
      target - 元のターゲットオブジェクト。
      clientType - MongoDB のクラスタ / クライアント型(例: MongoCluster)。
      sessionType - ClientSession 型。
      databaseType - MongoDB データベースの種類。
      databaseDecorator - 命令型 / リアクティブ型 MongoDatabase のプロキシを作成するために使用される SessionAwareMethodInterceptor.ClientSessionOperator
      collectionType - MongoDB コレクション型。
      collectionDecorator - 命令型 / リアクティブ型 MongoCollection のプロキシを作成するために使用される SessionAwareMethodInterceptor.ClientSessionOperator
  • 方法の詳細