クラス RecordId

java.lang.ObjectSE
org.springframework.data.redis.connection.stream.RecordId

public class RecordId extends ObjectSE
ストリーム内の単一の Record の ID。<millisecondsTime>-<sequenceNumber> の 2 つの部分で構成されます。
導入:
2.2
作成者:
Christoph Strobl
関連事項:
  • メソッドの詳細

    • of

      public static RecordId of(@Nullable StringSE value)
      <millisecondsTime>-<sequenceNumber> の形式で指定された文字列を使用して、RecordId のインスタンスを取得します。
      null または * の挿入パスでサーバーが自動生成した entry-id の場合。より良いイベント、autoGenerate() を使用してください。
      パラメーター:
      value - null でもかまいません。
      戻り値:
      自動生成されたインスタンスがリクエストされていない場合は、RecordId の新しいインスタンス。
    • of

      public static RecordId of(long millisecondsTime, long sequenceNumber)
      <millisecondsTime>-<sequenceNumber> の形式で指定された文字列を使用して、RecordId の新しいインスタンスを作成します。
      挿入時にサーバーが自動生成する entry-id には、autoGenerate() を使用します。
      パラメーター:
      millisecondsTime -
      sequenceNumber -
      戻り値:
      RecordId の新しいインスタンス。
    • autoGenerate

      public static RecordId autoGenerate()
      挿入時にエントリ ID を自動生成するようにサーバーに通知する RecordId を取得します(XADD)。
      戻り値:
      shouldBeAutoGenerated() を通知する RecordId インスタンス。
    • getTimestamp

      @Nullable public LongSE getTimestamp()
      エントリ ID の milsersTime 部分を取得するか、shouldBeAutoGenerated() の場合は null を取得します。
      戻り値:
      エントリ ID のミリ秒時間。null にすることができます。
    • getSequence

      @Nullable public LongSE getSequence()
      エントリ ID の sequenceNumber 部分を取得するか、shouldBeAutoGenerated() の場合は null を取得します。
      戻り値:
      エントリ ID の sequenceNumber。null にすることができます。
    • shouldBeAutoGenerated

      public boolean shouldBeAutoGenerated()
      戻り値:
      XADD を呼び出すときに、サーバー側で新しいエントリ ID が生成される場合は true。
    • getValue

      public StringSE getValue()
      戻り値:
      エントリ ID の文字列表現を <millisecondsTime>-<sequenceNumber> 形式で取得するか、shouldBeAutoGenerated() の場合は * を取得します。null になることはありません。
    • toString

      public StringSE toString()
      オーバーライド:
      クラス ObjectSEtoString 
    • equals

      public boolean equals(@Nullable ObjectSE o)
      オーバーライド:
      クラス ObjectSEequalsSE 
    • hashCode

      public int hashCode()
      オーバーライド:
      クラス ObjectSEhashCode