001/*
002 * Copyright 2026 Revetware LLC.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017package com.revetsec.totp;
018
019/**
020 * Payload-free acknowledgement of an atomic TOTP write. Only COMMITTED confirms the transition.
021 * @since 1.0.0
022 */
023@javax.annotation.concurrent.Immutable
024public enum TotpStoreCommitResult {
025 /**
026  * All predicates matched and all mutations committed.
027  */ COMMITTED,
028 /**
029  * A version or absence predicate failed; no mutation occurred.
030  */ CONFLICT,
031 /**
032  * Capacity was insufficient; no record was evicted and no mutation occurred.
033  */ CAPACITY_REFUSED,
034 /**
035  * The active authority, recovery/clock generation or address epoch was fenced; no mutation occurred.
036  */ FENCED,
037 /**
038  * Current data admission exists but healthy admitted time was unavailable at validation; no effect.
039  */ TIME_UNAVAILABLE,
040 /**
041  * Fresh admitted validation time was below the inclusive condition floor; no effect.
042  */ TIME_BEFORE_FLOOR,
043 /**
044  * Fresh admitted validation time reached the original exclusive expiry; no effect.
045  */ TIME_EXPIRED,
046 /**
047  * The backend failed before any possible mutation.
048  */ UNAVAILABLE,
049 /**
050  * A write may have committed; never retry automatically.
051  */ UNKNOWN
052}