DEENESPTFRRUARHIKOZHNL

클래스 ara::per::KeyValueStorage

[SWS_PER_00339] Upstream: RS_PER_00002, RS_AP_00122, RS_AP_00140, RS_AP_00146

class KeyValueStorage final {...};

The Key-Value Storage contains a set of keys with associated values.

Header-Datei#include "ara/per/key_value_storage.h"
Forwarding-Header#include "ara/per/per_fwd.h"
Scopenamespace ara::per

사용자 가이드AI 생성

명시적 동기화를 동반한 트랜잭션 읽기 및 쓰기 작업을 통해 영속적인 키-값 쌍을 관리합니다.
AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 74f93d55aa8a 출처 열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

명시적 동기화를 동반한 트랜잭션 읽기 및 쓰기 작업을 통해 영속적인 키-값 쌍을 관리합니다.

이 클래스는 트랜잭션 방식으로 작동하는 키-값 스토리지를 제공하며, 수정 사항은 SyncToStorage()을 통해서만 물리적 데이터 캐리어에 기록되거나 DiscardPendingChanges()을 통해 폐기됩니다 [SWS_PER_00049], [SWS_PER_00365]. 인스턴스는 복사나 이동이 불가능하고 스레드 안전한 접근 메서드를 제공하지만, 소멸 시에는 동시 호출을 배제해야 합니다 [SWS_PER_00322], [SWS_PER_00050]. 동기화 중 하드웨어 결함이 발생할 경우 자동 롤백 시맨틱은 더 이상 적용되지 않습니다 [SWS_PER_00049].

컨텍스트

ara::per::KeyValueStorage 클래스는 AUTOSAR Adaptive Platform 내에서 타입화된 키-값 스토리지를 제공하며, 영속 데이터를 연관된 값이 있는 키 집합으로 관리합니다. 이 클래스는 애플리케이션이 구성된 애플리케이션 데이터를 영속적으로 저장하고 검색하기 위한 기본 인터페이스 역할을 합니다. [SWS_PER_00042], [SWS_PER_00043], [SWS_PER_00044], [SWS_PER_00332] 및 [SWS_PER_00554]의 읽기 작업에 명세된 바와 같이, 접근은 물리적 저장 매체에 직접 수행되는 대신 내부 트랜잭션 상태를 통한 트랜잭션 시맨틱으로 수행됩니다. 수정 연산은 처음에 순수 트랜잭션 방식으로 작동하며 명시적인 동기화가 있을 때만 물리적 스토리지를 변경합니다 [SWS_PER_00046], [SWS_PER_00047], [SWS_PER_00048], [SWS_PER_00049].

수명 주기

ara::per::KeyValueStorage의 인스턴스화 및 소유권에는 엄격한 제한이 적용됩니다. 기본 생성자 [SWS_PER_00459]뿐만 아니라 복사 및 이동 생성자 [SWS_PER_00324], [SWS_PER_00322]도 삭제되었습니다(=delete). 복사 및 이동 할당 연산자 역시 명시적으로 제거되었습니다 [SWS_PER_00325], [SWS_PER_00323]. 따라서 인스턴스는 복사하거나 이동할 수 없습니다. 스토리지 객체 생성은 OpenKeyValueStorage()을 통한 초기화를 통해 수행되며, 이는 동시에 대기 중인 변경 사항의 출발점을 정의합니다 [SWS_PER_00365]. 소멸자 [SWS_PER_00050]는 예외 안전하지만 명시적으로 스레드 안전하지 않은 것으로 명세되어 있으므로, 더 이상 병렬 접근이 실행되지 않을 때에만 소멸이 발생해야 합니다. 정규 운영 시 모든 접근 메서드는 스레드 안전하게 설계되었지만, 다른 스레드의 동시 쓰기 또는 동기화 호출로 인해 지연될 수 있습니다 [SWS_PER_00046], [SWS_PER_00049], [SWS_PER_00365].

사용 경로

전형적인 사용 경로에는 데이터 값 설정 또는 업데이트, 현재 트랜잭션 상태의 선택적 확인 또는 읽기, 그리고 변경 사항의 최종 영속적 쓰기 또는 폐기가 포함됩니다. SetValue<T>()을 사용하여 현재 트랜잭션 컨텍스트에서 키-값 쌍이 할당되거나 덮어쓰입니다 [SWS_PER_00046]. 기존 키는 KeyExists()를 통해 확인하고 [SWS_PER_00043], 그 바이트 크기는 GetCurrentValueSize()를 통해 확인하며 [SWS_PER_00554], 해당 값은 GetValue<T>()의 타입 안전한 오버로드를 통해 읽을 수 있습니다 [SWS_PER_00044], [SWS_PER_00332]. SyncToStorage()를 호출해야만 누적된 모든 변경 사항이 물리적 저장 매체에 원자적으로 전송됩니다 [SWS_PER_00049]. 반면 동기화되지 않은 변경 사항을 폐기해야 하는 경우 DiscardPendingChanges()은 상태를 마지막 SyncToStorage() 또는 열기 시점의 상태로 되돌립니다 [SWS_PER_00365].

트랜잭션 저장 및 동기화 흐름애플리케이션KeyValueStoragePhysischerSpeicherSetValue(key, value)Transaktionspuffer aktualisierenResult<void>GetValue<T>(key)Transaktionsstand lesenResult<T>alt변경 사항 영구 저장SyncToStorage()데이터 블록 영속화Status QuittungResult<void>변경 사항 취소DiscardPendingChanges()버퍼를 마지막 Sync 상태로 비우기Result<void>

시퀀스 다이어그램: 물리적 스토리지와의 수정, 검증 및 동기화의 전형적인 절차. 출처: [SWS_PER_00046], [SWS_PER_00332], [SWS_PER_00049], [SWS_PER_00365]

오류 시나리오

모든 메서드는 ara::core::Result을 통해 오류를 반환합니다. 이때 롤백 보장이 있는 작업과 롤백이 없는 오류가 정밀하게 구분됩니다:

  • 구성 및 쓰기 보호 오류: 읽기 전용 스토리지에서 쓰기 메서드를 호출하거나 Write-Only-Once 구성에서 이미 존재하는 키가 있는 경우 작업은 PerErrc::kIllegalWriteAccess과 함께 실패합니다 [SWS_PER_00046], [SWS_PER_00047], [SWS_PER_00048], [SWS_PER_00049].
  • 타입 충돌 및 키 가용성: 덮어쓰기 또는 읽기 시 데이터 타입이 저장된 타입과 일치하지 않으면 PerErrc::kDataTypeMismatch이 발생합니다 [SWS_PER_00044], [SWS_PER_00332], [SWS_PER_00046]. 찾을 수 없는 키는 PerErrc::kKeyNotFound를 보고합니다 [SWS_PER_00044], [SWS_PER_00554]. ResetKey()의 경우 초기값이 정의되어 있지 않으면 PerErrc::kInitValueNotAvailable이 트리거됩니다 [SWS_PER_00426].
  • 저장 공간 및 할당량 위반: 새로운 데이터 볼륨이 구성된 한도 maximumAllowedSize을 초과하면 PerErrc::kQuotaExceeded이 보고됩니다 [SWS_PER_00046], [SWS_PER_00049]. 물리적 스토리지가 부족한 경우 SyncToStorage() 또는 RecoverKey()는 롤백 시맨틱 없이 PerErrc::kOutOfStorageSpace 오류를 반환합니다 [SWS_PER_00049], [SWS_PER_00427].
  • 무결성, 암호화 및 하드웨어 오류: 물리적 접근 오류(PerErrc::kPhysicalStorageFailure)는 읽기 작업 및 SetValue()에서 롤백 시맨틱을 가지지만 [SWS_PER_00046], SyncToStorage()에서는 롤백 시맨틱을 갖지 않습니다 [SWS_PER_00049]. 구조적 손상(PerErrc::kIntegrityCorrupted), 복호화 오류(PerErrc::kEncryptionFailed) 또는 실패한 MAC 검증(PerErrc::kAuthenticationFailed)은 RecoverKey()과 같은 읽기, 쓰기 및 복구 작업에 의해 신호됩니다 [SWS_PER_00427].

이 가이드는 AUTOSAR R25-11을 기반으로 AI 지원 문서화 시스템에 의해 생성되었습니다.

멤버 맵

클래스 다이어그램

Hohle Dreieckspfeile = Vererbung (zeigt zur Basisklasse); Klicken öffnet die jeweilige Klassenseite.

G nara__per__KeyValueStorage981 KeyValueStorage + KeyValueStorage() + operator=() + ~KeyValueStorage() + DiscardPendingChanges() + GetAllKeys() + GetCurrentValueSize() + GetValue() + KeyExists() + RecoverKey() + RemoveAllKeys() + RemoveKey() + ResetKey() + SetValue() + SyncToStorage()

상세 보기

개요에서 항목을 선택하세요.

생성자 및 소멸자

The move constructor for KeyValueStorage shall not be used.

오버로드 KeyValueStorage 3
KeyValueStorage (KeyValueStorage &&kvs)=delete; SWS_PER_00322
KeyValueStorage (const KeyValueStorage &)=delete; SWS_PER_00324
KeyValueStorage ()=delete; SWS_PER_00459

Destructor for KeyValueStorage.

~KeyValueStorage () noexcept;

메서드

Removes all pending changes to this Key-Value Storage since the last call to SyncToStorage() or since this Key-Value Storage was opened using OpenKeyValueStorage(). DiscardPendingChanges may be delayed by an ongoing call from another thread to RemoveAll Keys, SyncToStorage, DiscardPendingChanges, SetValue, GetValue, GetCurrentValueSize, RemoveKey, RecoverKey, or ResetKey.

ara::core::Result< void > DiscardPendingChanges () noexcept;
GetAllKeys 함수

Returns a list of all currently available keys of this Key-Value Storage. The list of keys is only accurate if no key-value pair is added or deleted at the same time. This method uses transaction semantics, it sees the current state of transaction, not the actual physical storage.

ara::core::Result< ara::core::Vector< ara::core::String > > GetAllKeys () const noexcept;

Returns the size (in bytes) of the value assigned to a key of this Key-Value Storage. GetCurrentValueSize may be delayed by an ongoing call from another thread to RemoveAllKeys or DiscardPendingChanges, or to SetValue, RemoveKey, RecoverKey, or ResetKey for the same key-value pair. This method uses transaction semantics, it sees the current state of transaction, not the actual physical storage.

ara::core::Result< std::uint64_t > GetCurrentValueSize (ara::core::StringView key) const noexcept;
GetValue 함수 2

Returns the value assigned to a key of this KeyValueStorage. This method should only be used to access very large values repeatedly. GetValue may be delayed by an ongoing call from another thread to RemoveAllKeys or Discard PendingChanges, or to SetValue, RemoveKey, RecoverKey, or ResetKey for the same key-value pair. This method uses transaction semantics, it sees the current state of transaction, not the actual physical storage.

오버로드 GetValue 2
template <class T> ara::core::Result< void > GetValue (ara::core::StringView key, T &value) const noexcept; SWS_PER_00044
template <class T> ara::core::Result< T > GetValue (ara::core::StringView key) const noexcept; SWS_PER_00332
KeyExists 함수

Checks if a key-value pair exists in this Key-Value Storage. The result is only accurate if no key-value pair is added or deleted at the same time. E.g. when a key-value pair is removed in another thread directly after this function returned "true", the result is not valid anymore. This method uses transaction semantics, it sees the current state of transaction, not the actual physical storage.

ara::core::Result< bool > KeyExists (ara::core::StringView key) const noexcept;
RecoverKey 함수

Recovers a single key-value pair of this Key Value Storage. This method allows to recover a single key-value pair when the redundancy checks fail. This method does a best-effort recovery of the key-value pair. After recovery, the key-value pair might contain outdated or initial content, or might be lost. RecoverKey may be delayed by an ongoing call from another thread to RemoveAllKeys, SyncTo Storage, or DiscardPendingChanges, or to SetValue, GetValue, GetCurrentValueSize, Remove Key, RecoverKey, or ResetKey for the same key-value pair.

ara::core::Result< void > RecoverKey (ara::core::StringView key) noexcept;

Removes all key-value pairs and associated values from this Key-Value Storage. RemoveAllKeys may be delayed by an ongoing call from another thread to RemoveAllKeys, SyncToStorage, DiscardPendingChanges, SetValue, GetValue, GetCurrentValueSize, Remove Key, RecoverKey, or ResetKey. This method uses transaction semantics, the changes only take effect when SyncToStorage is called.

ara::core::Result< void > RemoveAllKeys () noexcept;
RemoveKey 함수

Removes a key and the associated value from this Key-Value Storage. RemoveKey may be delayed by an ongoing call from another thread to RemoveAllKeys, SyncTo Storage, or DiscardPendingChanges, or to SetValue, GetValue, GetCurrentValueSize, Remove Key, RecoverKey, or ResetKey for the same key-value pair. This method uses transaction semantics, the changes only take effect when SyncToStorage is called.

ara::core::Result< void > RemoveKey (ara::core::StringView key) noexcept;
ResetKey 함수

Resets a key of this Key-Value Storage to its initial value. ResetKey allows to reset a single key to its initial value. If the key is currently not available in the Key-Value Storage, it is re-created. Afterwards, the key-value pair will appear in both cases as if it was newly installed from the current Target Configuration. ResetKey will fail with kInitValueNotAvailable when neither Application Design nor Target Configuration define an initial value for the key. ResetKey may be delayed by an ongoing call from another thread to RemoveAllKeys, SyncTo Storage, or DiscardPendingChanges, or to SetValue, GetValue, GetCurrentValueSize, Remove Key, RecoverKey, or ResetKey for the same key-value pair.

ara::core::Result< void > ResetKey (ara::core::StringView key) noexcept;
SetValue 함수

Stores a key-value pair in this Key-Value Storage. If a value already exists and has the same data type as the new value, it is overwritten. If the new value has a different data type than the stored value, kDataTypeMismatch is returned. SetValue may be delayed by an ongoing call from another thread to RemoveAllKeys, SyncTo Storage, or DiscardPendingChanges, or to SetValue, GetValue, GetCurrentValueSize, Remove Key, RecoverKey, or ResetKey for the same key-value pair. This method uses transaction semantics, the changes only take effect when SyncToStorage is called.

template <class T> ara::core::Result< void > SetValue (ara::core::StringView key, const T &value) noexcept;

Flushes changed key-value pairs of the Key-Value Storage to the physical storage. SyncToStorage may be delayed by an ongoing call from another thread to RemoveAllKeys, DiscardPendingChanges, SetValue, RemoveKey, RecoverKey, or ResetKey.

ara::core::Result< void > SyncToStorage () noexcept;

연산자

operator= 함수 2

The move assignment operator for KeyValueStorage shall not be used.

오버로드 = 2
KeyValueStorage & operator= (KeyValueStorage &&kvs)=delete; SWS_PER_00323
KeyValueStorage & operator= (const KeyValueStorage &)=delete; SWS_PER_00325

메서드 문서

함수 DiscardPendingChanges [SWS_PER_00365] Upstream: RS_PER_00002, RS_AP_00119, RS_AP_00120, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< void > DiscardPendingChanges () noexcept;

Removes all pending changes to this Key-Value Storage since the last call to SyncToStorage() or since this Key-Value Storage was opened using OpenKeyValueStorage(). DiscardPendingChanges may be delayed by an ongoing call from another thread to RemoveAll Keys, SyncToStorage, DiscardPendingChanges, SetValue, GetValue, GetCurrentValueSize, RemoveKey, RecoverKey, or ResetKey.

AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 73a36630080a 출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

사용법 및 의미론

클래스 ara::per::KeyValueStorage([SWS_PER_00365])의 동기 멤버 함수 DiscardPendingChanges은 헤더 ara/per/key_value_storage.h을 통해 제공됩니다. 매개변수를 받지 않으며 ara::core::Result<void>를 반환합니다. 이 함수의 목적은 SyncToStorage의 마지막 호출 이후 또는 OpenKeyValueStorage()을 사용해 연 이후 발생한 Key-Value-Storage 인스턴스의 모든 보류 중인 변경사항을 취소하는 것입니다 [SWS_PER_00365].

상호 작용 및 트랜잭션 동작

SetValue [SWS_PER_00046], RemoveKey [SWS_PER_00047] 및 RemoveAllKeys [SWS_PER_00048]와 같은 쓰기 작업에는 트랜잭션 시맨틱이 적용됩니다. 해당 변경사항은 SyncToStorage을 호출해야 물리적 스토리지 미디어에 영구적으로 기록됩니다 [SWS_PER_00049]. DiscardPendingChanges을 통해 이러한 저장되지 않은 수정 사항이 롤백되므로 GetCurrentValueSize를 통한 조회 역시 이전의 트랜잭션 시작 상태를 다시 반영합니다 [SWS_PER_00554].

오류 처리 및 동시성

오류 발생 시 결과에는 정의된 롤백 시맨틱과 함께 제조업체별 오류 또는 PerErrc의 오류 코드가 포함됩니다 [SWS_PER_00365]:

  • PerErrc::kIllegalWriteAccess: 스토리지가 쓰기 금지되어 있거나 Write-Only-Once 구성에서 키가 이미 존재하는 경우.
  • PerErrc::kPhysicalStorageFailure: 물리적 스토리지 미디어에 대한 액세스가 실패하는 경우.
  • PerErrc::kIntegrityCorrupted, PerErrc::kValidationFailed, PerErrc::kEncryptionFailed 또는 PerErrc::kAuthenticationFailed: 무결성 손실, 유효성 검사 오류, 복호화 오류 또는 실패한 MAC 검증 시.

이 메서드는 noexcept으로 선언되어 있으며 예외로부터 안전(exception safe)하고 스레드 안전(thread-safe)합니다 [SWS_PER_00365]. 그러나 다른 스레드에서 병렬로 SyncToStorage, SetValue, RemoveKey, RemoveAllKeys, ResetKey 또는 RecoverKey의 호출이 활성 상태인 경우 실행이 지연될 수 있습니다 [SWS_PER_00365] [SWS_PER_00426] [SWS_PER_00427].

이 텍스트는 AI에 의해 생성되었으며 AUTOSAR 사양을 기반으로 큐레이팅되었습니다.

구현자 가이드 준비 중 (복잡도 I2)

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe

Rückgabewert

TypBeschreibung
ara::core::Result< void >A Result of void. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
PerErrc::kIllegalWriteAccessrollback_semantics Returned if the Key-Value Storage is configured as read- only, or if it is configured as write-only-once and the key already exists.
PerErrc::kPhysicalStorageFailurerollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be read because the structural integrity is corrupted.
PerErrc::kValidationFailedrollback_semantics Returned if the validity of stored data cannot be ensured.
PerErrc::kEncryptionFailedrollback_semantics Returned if the decryption of stored data fails.
PerErrc::kAuthenticationFailedrollback_semantics Returned if checking the MAC of stored data fails.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_PER_00365
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00365@rel:R25-11#10d56c75
Content hash
10d56c75
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00365
Status: valid/unmigrated Version: rel:R25-11#f3496212 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00365@rel:R25-11#f3496212
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#0793e9a52026-09-30
  • R19-11rel:R19-11#90dcd0d22026-10-14
  • R20-11rel:R20-11#306302ca2026-10-14
  • R21-11rel:R21-11#5bb9ceb52026-10-14
  • R22-11rel:R22-11#6374aaa62026-10-14
  • R23-11rel:R23-11#7a4bc2902026-10-14
  • R24-11rel:R24-11#fd18fb832026-10-14
  • R25-11rel:R25-11#f34962122026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

함수 GetAllKeys [SWS_PER_00042] Upstream: RS_PER_00003, RS_AP_00119, RS_AP_00120, RS_AP_00127, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< ara::core::Vector< ara::core::String > > GetAllKeys () const noexcept;

Returns a list of all currently available keys of this Key-Value Storage. The list of keys is only accurate if no key-value pair is added or deleted at the same time. This method uses transaction semantics, it sees the current state of transaction, not the actual physical storage.

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kPhysical rollback_semantics

Rückgabewert

TypBeschreibung
ara::core::Result<ara::core::Vector<ara::core::String > >A Result containing a list of available keys. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
StorageFailureReturned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be read because the structural integrity is corrupted.
PerErrc::kValidationFailedrollback_semantics Returned if the validity of stored data cannot be ensured.
PerErrc::kEncryptionFailedrollback_semantics Returned if the decryption of stored data fails.
PerErrc::kAuthenticationFailedrollback_semantics Returned if checking the MAC of stored data fails.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_PER_00042
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00042@rel:R25-11#362d04dc
Content hash
362d04dc
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00042
Status: valid/unmigrated Version: rel:R25-11#7764796d Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00042@rel:R25-11#7764796d
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#b9c10dc72026-09-30
  • R19-11rel:R19-11#dc305f7c2026-10-14
  • R20-11rel:R20-11#5ed793b42026-10-14
  • R21-11rel:R21-11#d356f6902026-10-14
  • R22-11rel:R22-11#ef6f96bc2026-10-14
  • R23-11rel:R23-11#13f7a5a82026-10-14
  • R24-11rel:R24-11#84dcd6932026-10-14
  • R25-11rel:R25-11#7764796d2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

함수 GetCurrentValueSize [SWS_PER_00554] Upstream: RS_PER_00017, RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< std::uint64_t > GetCurrentValueSize (ara::core::StringView key) const noexcept;

Returns the size (in bytes) of the value assigned to a key of this Key-Value Storage. GetCurrentValueSize may be delayed by an ongoing call from another thread to RemoveAllKeys or DiscardPendingChanges, or to SetValue, RemoveKey, RecoverKey, or ResetKey for the same key-value pair. This method uses transaction semantics, it sees the current state of transaction, not the actual physical storage.

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kKeyNotFound rollback_semantics

Parameter (in)

ParameterBeschreibung
keyThe key to look up.

Rückgabewert

TypBeschreibung
ara::core::Result<std::uint64_t >A Result containing the size of the value in bytes. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
Returned if the provided key does not exist in the Key-Value
Storage.
PerErrc::kPhysicalStorageFailurerollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be read because the structural integrity is corrupted.
PerErrc::kValidationFailedrollback_semantics Returned if the validity of stored data cannot be ensured.
PerErrc::kEncryptionFailedrollback_semantics Returned if the decryption of stored data fails.
PerErrc::kAuthenticationFailedrollback_semantics Returned if checking the MAC of stored data fails.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_PER_00554
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00554@rel:R25-11#ce073445
Content hash
ce073445
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00554
Status: valid/unmigrated Version: rel:R25-11#24655af4 Versionshistorie & Revisions (1 transition, 5 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00554@rel:R25-11#24655af4
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#83415bd32026-09-30
  • R22-11rel:R22-11#929002202026-10-14
  • R23-11rel:R23-11#de5e8c192026-10-14
  • R24-11rel:R24-11#031b61af2026-10-14
  • R25-11rel:R25-11#24655af42026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

함수 GetValue [SWS_PER_00044] Upstream: RS_PER_00003, RS_PER_00010, RS_AP_00119, RS_AP_00120, RS_ AP_00121, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00136, RS_AP_00139, RS_AP_00141, RS_AP_00159

template <class T> ara::core::Result< void > GetValue (ara::core::StringView key, T &value) const noexcept;

Returns the value assigned to a key of this KeyValueStorage. This method should only be used to access very large values repeatedly. GetValue may be delayed by an ongoing call from another thread to RemoveAllKeys or Discard PendingChanges, or to SetValue, RemoveKey, RecoverKey, or ResetKey for the same key-value pair. This method uses transaction semantics, it sees the current state of transaction, not the actual physical storage.

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kKeyNotFound rollback_semantics

Template-Parameter

ParameterBeschreibung
TThe type of the value that shall be retrieved.

Parameter (in)

ParameterBeschreibung
keyThe key to look up.

Parameter (out)

ParameterBeschreibung
valueThe retrieved value.

Rückgabewert

TypBeschreibung
ara::core::Result< void >A Result of void. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
Returned if the provided key does not exist in the Key-Value
Storage.
PerErrc::kPhysicalStorageFailurerollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be read because the structural integrity is corrupted.
PerErrc::kValidationFailedrollback_semantics Returned if the validity of stored data cannot be ensured.
PerErrc::kEncryptionFailedrollback_semantics Returned if the decryption of stored data fails.
PerErrc::kDataTypeMismatchrollback_semantics Returned if the data type of stored value does not match the templated type.
PerErrc::kAuthenticationFailedrollback_semantics Returned if checking the MAC of stored data fails.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_PER_00044
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00044@rel:R25-11#bcda07c7
Content hash
bcda07c7
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00044
Status: valid/unmigrated Version: rel:R25-11#d1fc24ca Versionshistorie & Revisions (1 transition, 5 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00044@rel:R25-11#d1fc24ca
Point-in-Time History:
Recorded Revisions (5):
  • R25-11rel:R25-11#51af7b752026-09-30
  • R22-11rel:R22-11#aba3314c2026-10-14
  • R23-11rel:R23-11#5ce84da62026-10-14
  • R24-11rel:R24-11#e55139fe2026-10-14
  • R25-11rel:R25-11#d1fc24ca2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

함수 GetValue [SWS_PER_00332] Upstream: RS_PER_00003, RS_PER_00010, RS_AP_00119, RS_AP_00120, RS_ AP_00121, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00136, RS_AP_00139, RS_AP_00159

template <class T> ara::core::Result< T > GetValue (ara::core::StringView key) const noexcept;

Returns the value assigned to a key of this Key-Value Storage. GetValue may be delayed by an ongoing call from another thread to RemoveAllKeys or Discard PendingChanges, or to SetValue, RemoveKey, RecoverKey, or ResetKey for the same key-value pair. This method uses transaction semantics, it sees the current state of transaction, not the actual physical storage.

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kKeyNotFound rollback_semantics

Template-Parameter

ParameterBeschreibung
TThe type of the value that shall be retrieved.

Parameter (in)

ParameterBeschreibung
keyThe key to look up.

Rückgabewert

TypBeschreibung
ara::core::Result< T >A Result containing the retrieved value. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
Returned if the provided key does not exist in the Key-Value
Storage.
PerErrc::kPhysicalStorageFailurerollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be read because the structural integrity is corrupted.
PerErrc::kValidationFailedrollback_semantics Returned if the validity of stored data cannot be ensured.
PerErrc::kEncryptionFailedrollback_semantics Returned if the decryption of stored data fails.
PerErrc::kDataTypeMismatchrollback_semantics Returned if the data type of stored value does not match the templated type.
PerErrc::kAuthenticationFailedrollback_semantics Returned if checking the MAC of stored data fails.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_PER_00332
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00332@rel:R25-11#ae75c7c4
Content hash
ae75c7c4
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00332
Status: valid/unmigrated Version: rel:R25-11#dcb7cd2f Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00332@rel:R25-11#dcb7cd2f
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#f6c15de42026-09-30
  • R19-11rel:R19-11#e0b2cbd72026-10-14
  • R20-11rel:R20-11#817780202026-10-14
  • R21-11rel:R21-11#efed588e2026-10-14
  • R22-11rel:R22-11#cb63ddd02026-10-14
  • R23-11rel:R23-11#03fe0a512026-10-14
  • R24-11rel:R24-11#e6d6eef02026-10-14
  • R25-11rel:R25-11#dcb7cd2f2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

함수 KeyExists [SWS_PER_00043] Upstream: RS_PER_00003, RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00127, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< bool > KeyExists (ara::core::StringView key) const noexcept;

Checks if a key-value pair exists in this Key-Value Storage. The result is only accurate if no key-value pair is added or deleted at the same time. E.g. when a key-value pair is removed in another thread directly after this function returned "true", the result is not valid anymore. This method uses transaction semantics, it sees the current state of transaction, not the actual physical storage.

AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: d5f804c0cf2d 출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

ara::per::KeyValueStorage 클래스의 동기식 메서드 KeyExists은(는) 특정 키-값 쌍이 스토리지에 존재하는지 확인합니다 [SWS_PER_00043]. 입력 매개변수로는 ara::core::StringView 타입의 확인할 키 key이(가) 전달됩니다 [SWS_PER_00043]. 반환값은 키를 찾은 경우 true을 포함하고 그렇지 않은 경우 false을 포함하는 ara::core::Result<bool>입니다 [SWS_PER_00043]. 이 함수는 const 및 noexcept(으)로 선언되어 있으며 예외 안전(exception safe)합니다 [SWS_PER_00043].

시맨틱 및 동시성과 관련하여 KeyExists은(는) 트랜잭션 기반으로 작동합니다. 즉, 물리적 스토리지를 반드시 반영하는 것은 아니며 트랜잭션의 현재 상태를 반영합니다 [SWS_PER_00043]. 실행 자체는 스레드 안전(thread-safe)하지만, 반환된 결과는 동시에 키-값 쌍이 추가되거나 삭제되지 않는 경우에만 정확합니다 [SWS_PER_00043]. 예를 들어 true이(가) 반환된 직후 다른 스레드에서 해당 쌍을 제거하면 결과의 유효성이 상실됩니다 [SWS_PER_00043].

오류 발생 시 Result에는 특정 오류 코드가 포함됩니다 [SWS_PER_00043]:

  • StorageFailure: 물리적 스토리지 접근 오류 [SWS_PER_00043].
  • PerErrc::kIntegrityCorrupted: 구조적 무결성 훼손으로 인해 저장된 데이터를 읽을 수 없음 [SWS_PER_00043].
  • PerErrc::kValidationFailed: 저장된 데이터의 유효성을 보장할 수 없습니다 [SWS_PER_00043].
  • PerErrc::kEncryptionFailed: 데이터 복호화 실패 [SWS_PER_00043].
  • PerErrc::kAuthenticationFailed: MAC 검증 실패 [SWS_PER_00043].
  • 제조사별 오류(vendor specific error) 또한 반환될 수 있습니다 [SWS_PER_00043].

이 텍스트는 AI에 의해 생성되었으며 AUTOSAR R25-11 사양을 기반으로 합니다.

구현자 가이드 준비 중 (복잡도 I1)

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kPhysical rollback_semantics

Parameter (in)

ParameterBeschreibung
keyThe key that shall be checked.

Rückgabewert

TypBeschreibung
ara::core::Result< bool >A Result containing true if the key could be located or false if it couldn’t. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
StorageFailureReturned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be read because the structural integrity is corrupted.
PerErrc::kValidationFailedrollback_semantics Returned if the validity of stored data cannot be ensured.
PerErrc::kEncryptionFailedrollback_semantics Returned if the decryption of stored data fails.
PerErrc::kAuthenticationFailedrollback_semantics Returned if checking the MAC of stored data fails.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_PER_00043
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00043@rel:R25-11#d4ef3182
Content hash
d4ef3182
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00043
Status: valid/unmigrated Version: rel:R25-11#e65b8880 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00043@rel:R25-11#e65b8880
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#e8b3c8032026-09-30
  • R19-11rel:R19-11#acb4571e2026-10-14
  • R20-11rel:R20-11#508cbca52026-10-14
  • R21-11rel:R21-11#198de15f2026-10-14
  • R22-11rel:R22-11#4b0b474d2026-10-14
  • R23-11rel:R23-11#b85446a12026-10-14
  • R24-11rel:R24-11#416f86462026-10-14
  • R25-11rel:R25-11#e65b88802026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

함수 KeyValueStorage [SWS_PER_00322] Upstream: RS_PER_00002, RS_AP_00120, RS_AP_00121, RS_AP_00129, RS_AP_00145, RS_AP_00159

KeyValueStorage (KeyValueStorage &&kvs)=delete;

The move constructor for KeyValueStorage shall not be used.

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_PER_00322
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00322@rel:R25-11#6235d868
Content hash
6235d868
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00322
Status: valid/unmigrated Version: rel:R25-11#225c60f1 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00322@rel:R25-11#225c60f1
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#98b7adb12026-09-30
  • R19-11rel:R19-11#061b66e82026-10-14
  • R20-11rel:R20-11#61caa7ac2026-10-14
  • R21-11rel:R21-11#0d2d108a2026-10-14
  • R22-11rel:R22-11#2127e47e2026-10-14
  • R23-11rel:R23-11#1e46b07b2026-10-14
  • R24-11rel:R24-11#225c60f12026-10-14
  • R25-11rel:R25-11#225c60f12026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

함수 KeyValueStorage [SWS_PER_00324] Upstream: RS_PER_00002, RS_AP_00120, RS_AP_00145

KeyValueStorage (const KeyValueStorage &)=delete;

The copy constructor for KeyValueStorage shall not be used.

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_PER_00324
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00324@rel:R25-11#0fd4ee95
Content hash
0fd4ee95
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00324
Status: valid/unmigrated Version: rel:R25-11#3458c64f Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00324@rel:R25-11#3458c64f
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#b723be562026-09-30
  • R19-11rel:R19-11#9cddb3192026-10-14
  • R20-11rel:R20-11#eab3f9102026-10-14
  • R21-11rel:R21-11#eab3f9102026-10-14
  • R22-11rel:R22-11#b9dc355d2026-10-14
  • R23-11rel:R23-11#64874c0d2026-10-14
  • R24-11rel:R24-11#3458c64f2026-10-14
  • R25-11rel:R25-11#3458c64f2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

함수 KeyValueStorage [SWS_PER_00459] Upstream: RS_PER_00002, RS_AP_00120, RS_AP_00129, RS_AP_00146

KeyValueStorage ()=delete;

The default constructor for KeyValueStorage shall not be used.

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_PER_00459
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00459@rel:R25-11#c2240e1c
Content hash
c2240e1c
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00459
Status: valid/unmigrated Version: rel:R25-11#2cda50df Versionshistorie & Revisions (1 transition, 6 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00459@rel:R25-11#2cda50df
Point-in-Time History:
Recorded Revisions (6):
  • R25-11rel:R25-11#757585242026-09-30
  • R21-11rel:R21-11#74095de92026-10-14
  • R22-11rel:R22-11#db0f4fa82026-10-14
  • R23-11rel:R23-11#4c09eb602026-10-14
  • R24-11rel:R24-11#2cda50df2026-10-14
  • R25-11rel:R25-11#2cda50df2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

함수 RecoverKey [SWS_PER_00427] Upstream: RS_PER_00003, RS_PER_00009, RS_PER_00010, RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< void > RecoverKey (ara::core::StringView key) noexcept;

Recovers a single key-value pair of this Key Value Storage. This method allows to recover a single key-value pair when the redundancy checks fail. This method does a best-effort recovery of the key-value pair. After recovery, the key-value pair might contain outdated or initial content, or might be lost. RecoverKey may be delayed by an ongoing call from another thread to RemoveAllKeys, SyncTo Storage, or DiscardPendingChanges, or to SetValue, GetValue, GetCurrentValueSize, Remove Key, RecoverKey, or ResetKey for the same key-value pair.

AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 424fba0f9a95 출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

ara::per::KeyValueStorage 클래스의 동기 메서드 RecoverKey은 내부 중복성 검사가 실패할 때 개별 키-값 쌍을 최선형(best-effort)으로 복구하는 역할을 합니다[SWS_PER_00427]. 이 메서드는 매개변수 key을 통해 키의 식별자를 ara::core::StringView로 수신하고 ara::core::Result<void>를 통해 성공 또는 오류를 보고합니다[SWS_PER_00427]. 복구 후 해당 쌍은 오래된 콘텐츠나 초기 값을 가질 수 있으며, 완전히 유실될 수도 있습니다[SWS_PER_00427].

오류가 발생하면 결과는 PerErrc의 특정 오류 코드 또는 제조업체별 오류를 반환합니다[SWS_PER_00427]:

  • kKeyNotFound: 지정된 키가 스토리지에 존재하지 않습니다 [SWS_PER_00427].
  • kIllegalWriteAccess: 스토리지가 읽기 전용(read-only)으로 구성되어 있습니다[SWS_PER_00427].
  • kPhysicalStorageFailure: 물리적 스토리지에 대한 액세스에 실패했습니다 [SWS_PER_00427].
  • kIntegrityCorrupted: 구조적 무결성 손상으로 인해 데이터 쓰기가 방지됩니다[SWS_PER_00427].
  • kEncryptionFailed 또는 kAuthenticationFailed: 암호화/복호화 또는 MAC 검증이 실패합니다[SWS_PER_00427].
  • kOutOfStorageSpace 또는 kQuotaExceeded: 사용 가능한 물리적 스토리지가 부족하거나 구성된 최대 크기를 초과합니다[SWS_PER_00427].

이 작업은 thread-safe 및 exception-safe로 명시되어 있습니다[SWS_PER_00427]. 그러나 RemoveAllKeys [SWS_PER_00048], SyncToStorage [SWS_PER_00049] 또는 DiscardPendingChanges [SWS_PER_00365]과 같은 스토리지 전체 작업이 병렬로 실행되는 경우 호출이 지연될 수 있습니다[SWS_PER_00427]. 마찬가지로 동일한 키에 대해 SetValue [SWS_PER_00046], GetValue [SWS_PER_00044], GetCurrentValueSize [SWS_PER_00554], RemoveKey [SWS_PER_00047], ResetKey [SWS_PER_00426] 또는 다시 RecoverKey을 동시에 호출하는 경우에도 지연이 발생합니다[SWS_PER_00427]. 항목을 출하 시 상태로 재설정하는 ResetKey [SWS_PER_00426]과 달리, RecoverKey는 데이터 복구를 시도합니다[SWS_PER_00427].

본 사용 지침은 명세를 기반으로 자동 생성되었습니다.

구현자 가이드 준비 중 (복잡도 I2)

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kKeyNotFound rollback_semantics

Parameter (in)

ParameterBeschreibung
keyThe key to be recovered.

Rückgabewert

TypBeschreibung
ara::core::Result< void >A Result of void. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
Returned if the provided key does not exist in the Key-Value
Storage.
PerErrc::kIllegalWriteAccessrollback_semantics Returned if the Key-Value Storage is configured as read- only.
PerErrc::kPhysicalStorageFailureno_rollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be written because the structural integrity is corrupted.
PerErrc::kEncryptionFailedrollback_semantics Returned if the encryption or decryption of stored data fails.
PerErrc::kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for the recovered value.
PerErrc::kQuotaExceededrollback_semantics Returned if the recovered value would exceed the configured maximumAllowedSize of the Key-Value Storage.
PerErrc::kAuthenticationFailedrollback_semantics Returned if calculating or checking the MAC of stored data fails.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_PER_00427
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00427@rel:R25-11#1a1d4c9a
Content hash
1a1d4c9a
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00427
Status: valid/unmigrated Version: rel:R25-11#aaccab12 Versionshistorie & Revisions (1 transition, 7 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00427@rel:R25-11#aaccab12
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#1ff272ae2026-09-30
  • R20-11rel:R20-11#2a43812a2026-10-14
  • R21-11rel:R21-11#d955febb2026-10-14
  • R22-11rel:R22-11#e216dd632026-10-14
  • R23-11rel:R23-11#9839d1302026-10-14
  • R24-11rel:R24-11#4dc9fbc22026-10-14
  • R25-11rel:R25-11#aaccab122026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

함수 RemoveAllKeys [SWS_PER_00048] Upstream: RS_PER_00003, RS_PER_00010, RS_AP_00119, RS_AP_00120, RS_ AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< void > RemoveAllKeys () noexcept;

Removes all key-value pairs and associated values from this Key-Value Storage. RemoveAllKeys may be delayed by an ongoing call from another thread to RemoveAllKeys, SyncToStorage, DiscardPendingChanges, SetValue, GetValue, GetCurrentValueSize, Remove Key, RecoverKey, or ResetKey. This method uses transaction semantics, the changes only take effect when SyncToStorage is called.

AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 0ae35af4fc43 출처 열린 질문 (1)
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

사용법 및 트랜잭션 시맨틱

ara::per::KeyValueStorage 클래스의 메서드 RemoveAllKeys은(는) 스토리지에서 모든 키-값 쌍과 관련 콘텐츠를 제거합니다 [SWS_PER_00048]. 이 함수는 동기적으로 호출되고 전달 매개변수가 없으며 noexcept(으)로 지정되어 있습니다 [SWS_PER_00048]. 이 연산은 트랜잭션 시맨틱을 따릅니다. 모든 키의 삭제는 이후에 SyncToStorage [SWS_PER_00049]이(가) 호출되어야만 물리적 스토리지에 영구적으로 적용됩니다 [SWS_PER_00048]. 진행 중인 트랜잭션 내에서 GetValue [SWS_PER_00332]과(와) 같은 읽기 연산이나 GetCurrentValueSize [SWS_PER_00554]을(를) 통한 크기 쿼리는 비워진 상태를 즉시 반영합니다 [SWS_PER_00044].

오류 처리

반환값으로는 ara::core::Result<void>이(가) 사용됩니다 [SWS_PER_00048]. 오류가 발생하면 롤백 시맨틱이 적용됩니다 [SWS_PER_00048]. 발생 가능한 오류는 다음과 같습니다:

  • 읽기 전용으로 구성된 스토리지에서의 접근 위반(해석: 이는 오류 코드 PerErrc::kIllegalWrite에 해당할 것으로 추정됨) [SWS_PER_00048], 질문 Q-a820d779e19ac5c9 (열림)
  • 물리적 저장 매체에 대한 접근 오류 시 PerErrc::kPhysicalStorageFailure [SWS_PER_00048],
  • 구조적 데이터 무결성이 손상된 경우 PerErrc::kIntegrityCorrupted [SWS_PER_00048],
  • 암호화/복호화 또는 MAC 검증 실패 시 PerErrc::kEncryptionFailed 및 PerErrc::kAuthenticationFailed [SWS_PER_00048], 그리고 제조업체별 오류.

동시성 및 상호 작용

이 메서드는 thread-safe 및 exception safe로 분류됩니다 [SWS_PER_00048]. 그러나 다른 스레드에서 RemoveAllKeys, SyncToStorage [SWS_PER_00049], SetValue [SWS_PER_00046], RemoveKey [SWS_PER_00047], ResetKey [SWS_PER_00426] 또는 RecoverKey [SWS_PER_00427] 호출이 동시에 활성화된 경우 실행이 지연될 수 있습니다 [SWS_PER_00048].

이 텍스트는 사양 요구 사항을 기반으로 AI에 의해 생성되었습니다.

구현자 가이드 준비 중 (복잡도 I2)

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kIllegalWrite rollback_semantics

Rückgabewert

TypBeschreibung
ara::core::Result< void >A Result of void. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
AccessReturned if the Key-Value Storage is configured as read- only.
PerErrc::kPhysicalStorageFailurerollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be written because the structural integrity is corrupted.
PerErrc::kEncryptionFailedrollback_semantics Returned if the encryption or decryption of stored data fails.
PerErrc::kAuthenticationFailedrollback_semantics Returned if calculating or checking the MAC of stored data fails.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_PER_00048
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00048@rel:R25-11#1b675e0b
Content hash
1b675e0b
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00048
Status: valid/unmigrated Version: rel:R25-11#098d4bc1 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00048@rel:R25-11#098d4bc1
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#8a8820ba2026-09-30
  • R19-11rel:R19-11#1050c61d2026-10-14
  • R20-11rel:R20-11#68ed9c542026-10-14
  • R21-11rel:R21-11#b0a3d35f2026-10-14
  • R22-11rel:R22-11#4ff9fb912026-10-14
  • R23-11rel:R23-11#c2afbb972026-10-14
  • R24-11rel:R24-11#5988f1162026-10-14
  • R25-11rel:R25-11#098d4bc12026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

함수 RemoveKey [SWS_PER_00047] Upstream: RS_PER_00003, RS_PER_00010, RS_AP_00119, RS_AP_00120, RS_ AP_00121, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< void > RemoveKey (ara::core::StringView key) noexcept;

Removes a key and the associated value from this Key-Value Storage. RemoveKey may be delayed by an ongoing call from another thread to RemoveAllKeys, SyncTo Storage, or DiscardPendingChanges, or to SetValue, GetValue, GetCurrentValueSize, Remove Key, RecoverKey, or ResetKey for the same key-value pair. This method uses transaction semantics, the changes only take effect when SyncToStorage is called.

AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: ea5f39b17dd8 출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

클래스 ara::per::KeyValueStorage의 동기 멤버 함수 RemoveKey은 Key-Value Storage [SWS_PER_00047]에서 키와 할당된 값을 제거하는 역할을 합니다. 제거할 키의 식별자를 매개변수 key를 통해 ara::core::StringView으로 수신하고 ara::core::Result<void>를 반환합니다 [SWS_PER_00047].

이 작업에는 트랜잭션 시맨틱이 적용됩니다. 변경사항은 물리적 스토리지에 즉시 영속화되지 않으며, 변경된 키-값 쌍을 동기화하는 SyncToStorage이 명시적으로 호출되어야 [SWS_PER_00047] 비로소 적용됩니다 [SWS_PER_00049]. 보류 중인 변경사항은 동기화 전에 DiscardPendingChanges을 사용하여 취소할 수 있습니다 [SWS_PER_00365]. GetValue [SWS_PER_00044], [SWS_PER_00332] 또는 GetCurrentValueSize [SWS_PER_00554]와 같은 읽기 액세스 역시 트랜잭션 상태에서 동작하므로 삭제를 즉시 반영합니다.

동시성과 관련하여 이 메서드는 스레드 안전(thread-safe) 및 예외로부터 안전(exception safe)으로 명시되어 있습니다 [SWS_PER_00047]. 다른 스레드에서 병렬로 RemoveAllKeys, SyncToStorage 또는 DiscardPendingChanges가 실행 중이거나 동시에 SetValue, GetValue, GetCurrentValueSize, RemoveKey, RecoverKey 또는 ResetKey과 같은 작업이 동일한 키-값 쌍에 액세스하는 경우 호출이 지연될 수 있습니다 [SWS_PER_00047].

실행 중 오류가 발생하면 롤백 시맨틱이 적용되고 반환된 Result 객체에 오류 코드가 포함됩니다 [SWS_PER_00047]:

  • PerErrc::kKeyNotFound: 지정된 키가 스토리지에 존재하지 않습니다 [SWS_PER_00047].
  • PerErrc::kIllegalWriteAccess: Key-Value Storage가 읽기 전용(read-only)으로 구성되어 있습니다 [SWS_PER_00047].
  • PerErrc::kPhysicalStorageFailure: 물리적 스토리지 미디어에 대한 액세스가 실패했습니다 [SWS_PER_00047].
  • PerErrc::kIntegrityCorrupted: 손상된 구조적 무결성으로 인해 쓰기가 실패했습니다 [SWS_PER_00047].
  • PerErrc::kEncryptionFailed 또는 PerErrc::kAuthenticationFailed: 암호화 또는 복호화가 실패하거나 MAC 계산/검증에 오류가 있습니다 [SWS_PER_00047].

이 사용 지침은 릴리스 R25-11용 AUTOSAR Adaptive 플랫폼 사양만을 기반으로 합니다.

구현자 가이드 준비 중 (복잡도 I2)

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kKeyNotFound rollback_semantics

Parameter (in)

ParameterBeschreibung
keyThe key to be removed.

Rückgabewert

TypBeschreibung
ara::core::Result< void >A Result of void. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
Returned if the provided key does not exist in the Key-Value
Storage.
PerErrc::kIllegalWriteAccessrollback_semantics Returned if the Key-Value Storage is configured as read- only.
PerErrc::kPhysicalStorageFailurerollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be written because the structural integrity is corrupted.
PerErrc::kEncryptionFailedrollback_semantics Returned if the encryption or decryption of stored data fails.
PerErrc::kAuthenticationFailedrollback_semantics Returned if calculating or checking the MAC of stored data fails.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_PER_00047
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00047@rel:R25-11#01cacc0e
Content hash
01cacc0e
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00047
Status: valid/unmigrated Version: rel:R25-11#60324d85 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00047@rel:R25-11#60324d85
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#4afcff802026-09-30
  • R19-11rel:R19-11#653b04072026-10-14
  • R20-11rel:R20-11#0d9118072026-10-14
  • R21-11rel:R21-11#53a1e66d2026-10-14
  • R22-11rel:R22-11#6d261f9c2026-10-14
  • R23-11rel:R23-11#8d4fd37e2026-10-14
  • R24-11rel:R24-11#e99607a92026-10-14
  • R25-11rel:R25-11#60324d852026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

함수 ResetKey [SWS_PER_00426] Upstream: RS_PER_00003, RS_PER_00009, RS_PER_00010, RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< void > ResetKey (ara::core::StringView key) noexcept;

Resets a key of this Key-Value Storage to its initial value. ResetKey allows to reset a single key to its initial value. If the key is currently not available in the Key-Value Storage, it is re-created. Afterwards, the key-value pair will appear in both cases as if it was newly installed from the current Target Configuration. ResetKey will fail with kInitValueNotAvailable when neither Application Design nor Target Configuration define an initial value for the key. ResetKey may be delayed by an ongoing call from another thread to RemoveAllKeys, SyncTo Storage, or DiscardPendingChanges, or to SetValue, GetValue, GetCurrentValueSize, Remove Key, RecoverKey, or ResetKey for the same key-value pair.

AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: ddb1025237e2 출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

사용

동기 메서드 ResetKey은 ara::per::KeyValueStorage 인스턴스 내의 개별 키-값 쌍을 초기 값으로 재설정합니다[SWS_PER_00426]. 매개변수로는 식별자 key이 ara::core::StringView로 전달됩니다[SWS_PER_00426]. 스토리지에 키가 현재 존재하지 않는 경우 새로 생성됩니다. 두 경우 모두 항목의 상태는 이후 현재 Target Configuration에서 새로 설치된 상태와 일치하게 됩니다[SWS_PER_00426]. 이 함수는 noexcept로 선언되어 있으며 ara::core::Result<void>을 반환합니다[SWS_PER_00426].

오류 처리

실행 중 오류가 발생하면 Result 객체는 해당하는 오류 코드를 반환합니다[SWS_PER_00426]:

  • PerErrc::kInitValueNotAvailable: Application Design이나 Target Configuration 모두에서 키에 대한 초기 값이 정의되어 있지 않은 경우(롤백 시맨틱 적용)[SWS_PER_00426].
  • kIllegalWrite: 키-값 스토리지가 읽기 전용(read-only)으로 구성된 경우[SWS_PER_00426].
  • PerErrc::kPhysicalStorageFailure 또는 PerErrc::kOutOfStorageSpace: 물리적 스토리지 접근 오류 또는 저장 공간 부족 시(롤백 시맨틱 미적용)[SWS_PER_00426].
  • PerErrc::kIntegrityCorrupted, PerErrc::kEncryptionFailed, PerErrc::kAuthenticationFailed 또는 PerErrc::kQuotaExceeded: 무결성 위반, 암호화 및 인증 오류 또는 구성된 AllowedSize 초과 시(각각 롤백 시맨틱 적용)[SWS_PER_00426].

동시성 및 상호 작용

이 함수는 thread-safe 및 exception-safe입니다[SWS_PER_00426]. 그러나 다른 스레드에서 RemoveAllKeys [SWS_PER_00048], SyncToStorage [SWS_PER_00049] 또는 DiscardPendingChanges [SWS_PER_00365]과 같은 스토리지 전체 작업이 병렬로 활성화되어 있는 경우 호출이 지연될 수 있습니다. 마찬가지로 SetValue [SWS_PER_00046], GetValue [SWS_PER_00044] [SWS_PER_00332], GetCurrentValueSize [SWS_PER_00554], RemoveKey [SWS_PER_00047], RecoverKey [SWS_PER_00427] 또는 또 다른 ResetKey을 통해 동일한 키에 동시에 접근하는 경우에도 지연이 발생합니다[SWS_PER_00426].

이 사용 지침은 AUTOSAR Adaptive R25-11 명세서를 기반으로 자동 생성되었습니다.

구현자 가이드 준비 중 (복잡도 I2)

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kIllegalWrite rollback_semantics

Parameter (in)

ParameterBeschreibung
keyThe key to be reset.

Rückgabewert

TypBeschreibung
ara::core::Result< void >A Result of void. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
AccessReturned if the Key-Value Storage is configured as read- only.
PerErrc::kPhysicalStorageFailureno_rollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be written because the structural integrity is corrupted.
PerErrc::kEncryptionFailedrollback_semantics Returned if the encryption or decryption of stored data fails.
PerErrc::kInitValueNotAvailablerollback_semantics Returned if no intitial value was configured for this key.
PerErrc::kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for the initial value.
PerErrc::kQuotaExceededrollback_semantics Returned if the initial value would exceed the configured maximum AllowedSize of the Key-Value Storage.
PerErrc::kAuthenticationFailedrollback_semantics Returned if calculating or checking the MAC of stored data fails.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_PER_00426
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00426@rel:R25-11#e6ca4b66
Content hash
e6ca4b66
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00426
Status: valid/unmigrated Version: rel:R25-11#e8b55641 Versionshistorie & Revisions (1 transition, 7 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00426@rel:R25-11#e8b55641
Point-in-Time History:
Recorded Revisions (7):
  • R25-11rel:R25-11#cb5662c22026-09-30
  • R20-11rel:R20-11#0af4dfeb2026-10-14
  • R21-11rel:R21-11#504218172026-10-14
  • R22-11rel:R22-11#e62113552026-10-14
  • R23-11rel:R23-11#221d69462026-10-14
  • R24-11rel:R24-11#e9b91b262026-10-14
  • R25-11rel:R25-11#e8b556412026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

함수 SetValue [SWS_PER_00046] Upstream: RS_PER_00003, RS_PER_00010, RS_AP_00119, RS_AP_00120, RS_ AP_00121, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00136, RS_AP_00139, RS_AP_00159

template <class T> ara::core::Result< void > SetValue (ara::core::StringView key, const T &value) noexcept;

Stores a key-value pair in this Key-Value Storage. If a value already exists and has the same data type as the new value, it is overwritten. If the new value has a different data type than the stored value, kDataTypeMismatch is returned. SetValue may be delayed by an ongoing call from another thread to RemoveAllKeys, SyncTo Storage, or DiscardPendingChanges, or to SetValue, GetValue, GetCurrentValueSize, Remove Key, RecoverKey, or ResetKey for the same key-value pair. This method uses transaction semantics, the changes only take effect when SyncToStorage is called.

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kIllegalWrite rollback_semantics

Template-Parameter

ParameterBeschreibung
TThe type of the value that shall be set.

Parameter (in)

ParameterBeschreibung
keyThe key to assign the value to.
valueThe value to store.

Rückgabewert

TypBeschreibung
ara::core::Result< void >A Result of void. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
AccessReturned if the Key-Value Storage is configured as read- only, or if it is configured as write-only-once and the key already exists.
PerErrc::kPhysicalStorageFailurerollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be written because the structural integrity is corrupted.
PerErrc::kEncryptionFailedrollback_semantics Returned if the encryption or decryption of stored data fails.
PerErrc::kDataTypeMismatchrollback_semantics Returned if the data type of an already stored value does not match the templated type.
PerErrc::kOutOfStorageSpacerollback_semantics Returned if the available physical storage space is insufficient for the new value.
PerErrc::kQuotaExceededrollback_semantics Returned if the new value would exceed the configured maximum AllowedSize of the Key-Value Storage.
PerErrc::kAuthenticationFailedrollback_semantics Returned if calculating or checking the MAC of stored data fails.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_PER_00046
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00046@rel:R25-11#b9249605
Content hash
b9249605
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00046
Status: valid/unmigrated Version: rel:R25-11#7952a862 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00046@rel:R25-11#7952a862
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#914345842026-09-30
  • R19-11rel:R19-11#394485ea2026-10-14
  • R20-11rel:R20-11#9bd70fdb2026-10-14
  • R21-11rel:R21-11#fc6359392026-10-14
  • R22-11rel:R22-11#f00787ed2026-10-14
  • R23-11rel:R23-11#640b066a2026-10-14
  • R24-11rel:R24-11#6fe6b6b92026-10-14
  • R25-11rel:R25-11#7952a8622026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

함수 SyncToStorage [SWS_PER_00049] Upstream: RS_PER_00002, RS_AP_00119, RS_AP_00120, RS_AP_00127, RS_AP_00128, RS_AP_00129, RS_AP_00135, RS_AP_00139, RS_AP_00159

ara::core::Result< void > SyncToStorage () noexcept;

Flushes changed key-value pairs of the Key-Value Storage to the physical storage. SyncToStorage may be delayed by an ongoing call from another thread to RemoveAllKeys, DiscardPendingChanges, SetValue, RemoveKey, RecoverKey, or ResetKey.

AI 생성 미검증 모델: gemini-3.8-flash-medium · 노력: medium · 온도: 제어 불가 · 프롬프트: 31e98920341c 출처
독일어 가이드에서 번역됨gemini-3.8-flash-low · 2026-10-13 · 독일어 원문

클래스 ara::per::KeyValueStorage의 동기 메서드 SyncToStorage은 메모리 버퍼에서 변경된 키-값 쌍을 물리적 스토리지에 영구적으로 기록합니다 [SWS_PER_00049]. 매개변수를 받지 않고 ara::core::Result<void>을 반환하며, noexcept로 선언되어 있고 예외로부터 안전하며 스레드 안전으로 명시되어 있습니다 [SWS_PER_00049].

상호 작용 및 트랜잭션 시맨틱

SetValue [SWS_PER_00046], RemoveKey [SWS_PER_00047] 및 RemoveAllKeys [SWS_PER_00048]와 같은 수정 작업은 트랜잭션 시맨틱을 사용합니다. 변경사항은 SyncToStorage을 호출해야 비로소 적용됩니다 [SWS_PER_00046]. 쓰기 전에 보류 중인 수정을 취소해야 하는 경우 대안으로 DiscardPendingChanges을 호출할 수 있습니다 [SWS_PER_00365].

동시성

함수가 스레드 안전함에도 불구하고 다른 스레드에서 병렬로 SetValue, RemoveKey, RemoveAllKeys, DiscardPendingChanges, RecoverKey 또는 ResetKey와 같은 작업이 활성 상태인 경우 실행이 지연될 수 있습니다 [SWS_PER_00049].

오류 처리

동기화가 실패하면 Result은 오류 코드를 반환합니다 [SWS_PER_00049]:

  • 롤백 시맨틱이 있는 오류(변경사항이 롤백됨): PerErrc::kIntegrityCorrupted, PerErrc::kEncryptionFailed, PerErrc::kAuthenticationFailed, PerErrc::kQuotaExceeded 및 PerErrc::kIllegalWrite [SWS_PER_00049].
  • 롤백 시맨틱이 없는 오류: 물리적 액세스 오류 시 PerErrc::kPhysicalStorageFailure 및 스토리지 공간 부족 시 PerErrc::kOutOfStorageSpace [SWS_PER_00049].
  • 구성 오류: 스토리지가 읽기 전용(read-only)으로 구성되어 있거나 write-only-once에서 키가 이미 존재하는 경우 오류 코드 Access [SWS_PER_00049].

이 사용 지침은 AUTOSAR 사양 R25-11을 바탕으로 자동 생성되었습니다.

구현자 가이드 준비 중 (복잡도 I2)

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitthread-safe PerErrc::kIllegalWrite rollback_semantics

Rückgabewert

TypBeschreibung
ara::core::Result< void >A Result of void. In case of an error, it contains any of the errors defined below, or a vendor specific error.

Fehler

FehlercodeBeschreibung
AccessReturned if the Key-Value Storage is configured as read- only, or if it is configured as write-only-once and the key already exists.
PerErrc::kPhysicalStorageFailureno_rollback_semantics Returned if access to the physical storage fails.
PerErrc::kIntegrityCorruptedrollback_semantics Returned if stored data cannot be written because the structural integrity is corrupted.
PerErrc::kEncryptionFailedrollback_semantics Returned if the encryption of stored data fails.
PerErrc::kOutOfStorageSpaceno_rollback_semantics Returned if the available physical storage space is insufficient for the added/changed values.
PerErrc::kQuotaExceededrollback_semantics Returned if the added/changed values would exceed the configured maximumAllowedSize of the Key-Value Storage.
PerErrc::kAuthenticationFailedrollback_semantics Returned if calculating the MAC of stored data fails.

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_PER_00049
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00049@rel:R25-11#9359daa0
Content hash
9359daa0
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00049
Status: valid/unmigrated Version: rel:R25-11#bedc7cd3 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00049@rel:R25-11#bedc7cd3
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#2fe641532026-09-30
  • R19-11rel:R19-11#a63d7bdd2026-10-14
  • R20-11rel:R20-11#2b2f8c592026-10-14
  • R21-11rel:R21-11#5a7863892026-10-14
  • R22-11rel:R22-11#7ba28f5a2026-10-14
  • R23-11rel:R23-11#0d431f372026-10-14
  • R24-11rel:R24-11#111d5e172026-10-14
  • R25-11rel:R25-11#bedc7cd32026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

함수 operator= [SWS_PER_00323] Upstream: RS_PER_00002, RS_AP_00119, RS_AP_00120, RS_AP_00121, RS_AP_00145, RS_AP_00159

KeyValueStorage & operator= (KeyValueStorage &&kvs)=delete;

The move assignment operator for KeyValueStorage shall not be used.

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_PER_00323
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00323@rel:R25-11#8fe73350
Content hash
8fe73350
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00323
Status: valid/unmigrated Version: rel:R25-11#0d46009f Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00323@rel:R25-11#0d46009f
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#d0aa05fb2026-09-30
  • R19-11rel:R19-11#c9df11fd2026-10-14
  • R20-11rel:R20-11#43e209d42026-10-14
  • R21-11rel:R21-11#3fa50ca32026-10-14
  • R22-11rel:R22-11#3a8958662026-10-14
  • R23-11rel:R23-11#d865b2282026-10-14
  • R24-11rel:R24-11#0d46009f2026-10-14
  • R25-11rel:R25-11#0d46009f2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

함수 operator= [SWS_PER_00325] Upstream: RS_PER_00002, RS_AP_00119, RS_AP_00120, RS_AP_00145

KeyValueStorage & operator= (const KeyValueStorage &)=delete;

The copy assignment operator for KeyValueStorage shall not be used.

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_PER_00325
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00325@rel:R25-11#5e188713
Content hash
5e188713
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00325
Status: valid/unmigrated Version: rel:R25-11#7eccc0d0 Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00325@rel:R25-11#7eccc0d0
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#25bc66e92026-09-30
  • R19-11rel:R19-11#fec94e692026-10-14
  • R20-11rel:R20-11#f05ae5d42026-10-14
  • R21-11rel:R21-11#f05ae5d42026-10-14
  • R22-11rel:R22-11#10326f822026-10-14
  • R23-11rel:R23-11#2038e13d2026-10-14
  • R24-11rel:R24-11#7eccc0d02026-10-14
  • R25-11rel:R25-11#7eccc0d02026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill

함수 ~KeyValueStorage [SWS_PER_00050] Upstream: RS_PER_00002, RS_AP_00120, RS_AP_00129, RS_AP_00134, RS_AP_00145, RS_AP_00159

~KeyValueStorage () noexcept;

Destructor for KeyValueStorage.

Header-Datei#include "ara/per/key_value_storage.h"
Scopeclass ara::per::KeyValueStorage
Exception-Sicherheitexception safe
Thread-Sicherheitnot thread-safe

Request a governed re-review of this record. The record is not changed immediately.

Record
AUTOSAR/AP/record/SWS_PER_00050
Status
valid/unmigrated
Version
AUTOSAR/AP/record/SWS_PER_00050@rel:R25-11#2868f5b8
Content hash
2868f5b8
Source
https://www.autosar.org/fileadmin/standards/R25-11/AP/AUTOSAR_AP_SWS_Persistency.pdf#nameddest=SWS_PER_00050
Status: valid/unmigrated Version: rel:R25-11#686fc2dc Versionshistorie & Revisions (1 transition, 8 revision)
Current State
valid/unmigrated
Reason
mechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record
Campaign
2026-08-13-status-backfill
Active Version
AUTOSAR/AP/record/SWS_PER_00050@rel:R25-11#686fc2dc
Point-in-Time History:
Recorded Revisions (8):
  • R25-11rel:R25-11#c322006e2026-09-30
  • R19-11rel:R19-11#d5051f6a2026-10-14
  • R20-11rel:R20-11#a653a0472026-10-14
  • R21-11rel:R21-11#a653a0472026-10-14
  • R22-11rel:R22-11#3e0145ae2026-10-14
  • R23-11rel:R23-11#8187a0df2026-10-14
  • R24-11rel:R24-11#686fc2dc2026-10-14
  • R25-11rel:R25-11#686fc2dc2026-10-14 active
DateActorTransitionReason / RationaleCampaign
2026-08-13toolnone → valid/unmigratedmechanically backfilled by migriere_status_backfill.py -- no per-field curation history exists yet for this record2026-08-13-status-backfill