クラス SpringReplayCache

java.lang.ObjectSE
org.springframework.ws.soap.security.wss4j2.cache.SpringReplayCache
実装済みのインターフェース一覧:
CloseableSE, AutoCloseableSE, org.apache.wss4j.common.cache.ReplayCache
既知の直属サブクラス
ConcurrentMapReplayCache

public class SpringReplayCache extends ObjectSE implements org.apache.wss4j.common.cache.ReplayCache
Apache WSS4J ReplayCache は、Spring Cache によって裏付けられています。各キーには、設定可能な TTL を持つ有効期限 InstantSE が格納されます。デフォルトの TTL は 5 分、最大 TTL は 1 時間です。

contains(String) は、その時点の情報を参照し、有効期限が過ぎたエントリを削除します。これは、バッキングキャッシュ独自の TTL 設定に依存しません。

サブクラスは onCacheAccess() をオーバーライドして、追加の削除処理、たとえばメモリ内キャッシュの完全なスキャンなどを実行できます。

本番環境で複数のホストを使用するデプロイの場合、各ホストが同じデータにアクセスする必要があるため、分散型の Cache 実装を使用してください。シンプルな単一ホストのデプロイの場合は、ConcurrentMapReplayCache を使用できます。

導入:
3.1.9
関連事項:
  • フィールド概要

    フィールド
    修飾子と型
    フィールド
    説明
    static final long
    エントリのデフォルト TTL(秒単位)。
    static final long
    エントリの最大 TTL(秒単位)。
  • コンストラクター概要

    コンストラクター
    コンストラクター
    説明
    SpringReplayCache(org.springframework.cache.Cache cache)
    指定されたキャッシュとデフォルトの TTL を使用してインスタンスを作成します。
    SpringReplayCache(org.springframework.cache.Cache cache, long defaultTtlSeconds, long maxTtlSeconds)
    指定されたキャッシュと TTL を使用してインスタンスを作成します。
  • 方法の概要

    修飾子と型
    メソッド
    説明
    void
    add(StringSE identifier)
    void
    add(StringSE identifier, @Nullable InstantSE expiry)
    void
    boolean
    contains(StringSE identifier)
    protected final org.springframework.cache.Cache
    protected void
    キャッシュにアクセスされた際に呼び出されます。エントリが保存された後、またはエントリの存在を確認する前に呼び出されます。

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

    clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSE
  • フィールドの詳細

    • DEFAULT_TTL

      public static final long DEFAULT_TTL
      エントリのデフォルト TTL(秒単位)。
      関連事項:
    • MAX_TTL

      public static final long MAX_TTL
      エントリの最大 TTL(秒単位)。
      関連事項:
  • コンストラクターの詳細

    • SpringReplayCache

      public SpringReplayCache(org.springframework.cache.Cache cache)
      指定されたキャッシュとデフォルトの TTL を使用してインスタンスを作成します。
      パラメーター:
      cache - 使用するキャッシュ
    • SpringReplayCache

      public SpringReplayCache(org.springframework.cache.Cache cache, long defaultTtlSeconds, long maxTtlSeconds)
      指定されたキャッシュと TTL を使用してインスタンスを作成します。
      パラメーター:
      cache - 使用するキャッシュ
      defaultTtlSeconds - デフォルトの TTL(秒単位)
      maxTtlSeconds - 最大 TTL(秒)
  • 方法の詳細

    • getCache

      protected final org.springframework.cache.Cache getCache()
    • add

      public void add(StringSE identifier)
      次で指定:
      インターフェース org.apache.wss4j.common.cache.ReplayCache 内の add 
    • add

      public void add(StringSE identifier, @Nullable InstantSE expiry)
      次で指定:
      インターフェース org.apache.wss4j.common.cache.ReplayCache 内の add 
    • contains

      public boolean contains(StringSE identifier)
      次で指定:
      インターフェース org.apache.wss4j.common.cache.ReplayCache 内の contains 
    • onCacheAccess

      protected void onCacheAccess()
      キャッシュにアクセスされた際に呼び出されます。エントリが保存された後、またはエントリの存在を確認する前に呼び出されます。
    • close

      public void close()
      次で指定:
      インターフェース AutoCloseableSE 内の close 
      次で指定:
      インターフェース CloseableSE 内の close