org.springframework.data.mongodb

Class SessionAwareMethodInterceptor<D,C>

  • java.lang.Object
    • org.springframework.data.mongodb.SessionAwareMethodInterceptor<D,C>
  • Type Parameters:
    D - Type of the actual Mongo Database.
    C - Type of the actual Mongo Collection.
    All Implemented Interfaces:
    Advice, Interceptor, MethodInterceptor


    public class SessionAwareMethodInterceptor<D,C>
    extends Object
    implements MethodInterceptor
    MethodInterceptor implementation looking up and invoking an alternative target method having ClientSession as its first argument. This allows seamless integration with the existing code base.

    The MethodInterceptor is aware of methods on MongoCollection that my return new instances of itself like (eg. MongoCollection.withWriteConcern(WriteConcern) and decorate them if not already proxied.

    Since:
    2.1
    Author:
    Christoph Strobl, Mark Paluch