Class InMemoryTotpStore.Builder

java.lang.Object
com.revetsec.totp.InMemoryTotpStore.Builder
Enclosing class:
InMemoryTotpStore

@NotThreadSafe @CheckReturnValue public static final class InMemoryTotpStore.Builder extends Object
Caller-thread configuration for explicit volatile storage. Defaults allow 1024 permanent records and 16 MiB of sealed payload. Building performs no I/O and creates no threads.
Since:
1.0.0
  • Method Details

    • maximumEntries

      Sets the permanent record-count capacity; records are never evicted.
      Parameters:
      maximumEntries - capacity from 1 to 65536, including namespace and old-epoch records; null restores 1024
      Returns:
      this builder
      Since:
      1.0.0
    • maximumSealedBytes

      Sets aggregate sealed-payload capacity.
      Parameters:
      maximumSealedBytes - capacity from 1 to 268435456 bytes; null restores 16 MiB
      Returns:
      this builder
      Since:
      1.0.0
    • build

      Creates a fresh process-local store with NEW activation state.
      Returns:
      the explicitly selected volatile store
      Since:
      1.0.0