クラス AbstractMongoSessionConverter

java.lang.ObjectSE
org.springframework.session.data.mongo.AbstractMongoSessionConverter
実装されているすべてのインターフェース:
org.springframework.core.convert.converter.GenericConverter
既知の直属サブクラス
JacksonMongoSessionConverterJdkMongoSessionConverter

public abstract class AbstractMongoSessionConverter extends ObjectSE implements org.springframework.core.convert.converter.GenericConverter
セッションオブジェクトを直列化および逆直列化するための基本クラス。カスタムシリアライザーを作成するには、このインターフェースを実装し、クラスを Bean として登録する必要があります。
導入:
1.2
  • ネストされたクラスの要約

    インターフェース org.springframework.core.convert.converter.GenericConverter から継承されたネストクラス / インターフェース

    org.springframework.core.convert.converter.GenericConverter.ConvertiblePair
  • コンストラクターの概要

    コンストラクター
    コンストラクター
    説明
  • メソッドのサマリー

    修飾子と型
    メソッド
    説明
    convert(ObjectSE source, org.springframework.core.convert.TypeDescriptor sourceType, org.springframework.core.convert.TypeDescriptor targetType)
    protected abstract org.springframework.session.data.mongo.MongoSession
    convert(org.bson.Document sessionWrapper)
    protected abstract com.mongodb.DBObject
    convert(org.springframework.session.data.mongo.MongoSession session)
    protected void
    ensureIndexes(org.springframework.data.mongodb.core.index.IndexOperations sessionCollectionIndexes)
    この方法は、expireAt フィールドに TTL インデックスが存在することを保証します。
    protected StringSE
    extractPrincipal(org.springframework.session.data.mongo.MongoSession expiringSession)
    SetSE<org.springframework.core.convert.converter.GenericConverter.ConvertiblePair>
    protected abstract org.springframework.data.mongodb.core.query.Query
    getQueryForIndex(StringSE indexName, ObjectSE indexValue)
    特定のインデックスに基づいてセッションを返すために実行されるクエリを返します。
    void

    クラス java.lang.ObjectSE から継承されたメソッド

    clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSE
  • コンストラクターの詳細

    • AbstractMongoSessionConverter

      public AbstractMongoSessionConverter()
  • メソッドの詳細

    • getQueryForIndex

      @Nullable protected abstract org.springframework.data.mongodb.core.query.Query getQueryForIndex(StringSE indexName, ObjectSE indexValue)
      特定のインデックスに基づいてセッションを返すために実行されるクエリを返します。
      パラメーター:
      indexName - インデックスの名前
      indexValue - クエリする値
      戻り値:
      構築されたクエリ、または indexName がサポートされていない場合は null
    • ensureIndexes

      protected void ensureIndexes(org.springframework.data.mongodb.core.index.IndexOperations sessionCollectionIndexes)
      このメソッドは、expireAt フィールドに TTL インデックスがあることを確認します。expireAfterSeconds は 0 秒に設定されているため、有効期限はアプリケーションによって制御されます。追加のカスタムインデックスを作成する必要がある場合は、カスタムコンバーターで拡張できます。
      パラメーター:
      sessionCollectionIndexes - 使用する IndexOperations 
    • extractPrincipal

      protected StringSE extractPrincipal(org.springframework.session.data.mongo.MongoSession expiringSession)
    • getConvertibleTypes

      public SetSE<org.springframework.core.convert.converter.GenericConverter.ConvertiblePair> getConvertibleTypes()
      次で指定:
      インターフェース org.springframework.core.convert.converter.GenericConvertergetConvertibleTypes 
    • convert

      @Nullable public ObjectSE convert(ObjectSE source, org.springframework.core.convert.TypeDescriptor sourceType, org.springframework.core.convert.TypeDescriptor targetType)
      次で指定:
      インターフェース org.springframework.core.convert.converter.GenericConverterconvert 
    • convert

      protected abstract com.mongodb.DBObject convert(org.springframework.session.data.mongo.MongoSession session)
    • convert

      protected abstract org.springframework.session.data.mongo.MongoSession convert(org.bson.Document sessionWrapper)
    • setIndexResolver

      public void setIndexResolver(IndexResolver<Session> indexResolver)