Move-only authority for submitting transactions to one DocumentSession. More...
#include <document_session.hpp>
Classes | |
| class | Provenance |
| Opaque identity of one writer authority within one document session. More... | |
Public Member Functions | |
| WriterToken ()=default | |
| Constructs an invalid token that cannot authorize submissions. | |
| WriterToken (const WriterToken &)=delete | |
| WriterToken & | operator= (const WriterToken &)=delete |
| WriterToken (WriterToken &&other) noexcept | |
| Transfers writer authority and invalidates other. | |
| WriterToken & | operator= (WriterToken &&other) noexcept |
| Replaces this authority with other and invalidates other. | |
| WriterId | id () const noexcept |
| Returns the writer identity carried by this token. | |
| Provenance | provenance () const noexcept |
| Returns an opaque fingerprint that remains stable when this token moves. | |
| TransactionId | allocate_transaction_id () noexcept |
| Allocates the next transaction ID, or an invalid ID after exhaustion. | |
| CommandId | allocate_command_id () noexcept |
| Allocates the next command ID, or an invalid ID after exhaustion. | |
| UndoGroupId | allocate_undo_group_id () noexcept |
| Allocates the next undo-group ID, or an invalid ID after exhaustion. | |
Friends | |
| class | DocumentSession |
| class | detail::WriterTokenTestAccess |
Move-only authority for submitting transactions to one DocumentSession.
A token is bound to the session that created it and remains valid until that session is destroyed. Its three allocation methods are safe to call concurrently and produce monotonically increasing, writer-scoped IDs. Exhaustion produces an invalid ID rather than wrapping.
|
default |
Constructs an invalid token that cannot authorize submissions.
|
delete |
|
noexcept |
Transfers writer authority and invalidates other.
|
noexcept |
Allocates the next command ID, or an invalid ID after exhaustion.
|
noexcept |
Allocates the next transaction ID, or an invalid ID after exhaustion.
|
noexcept |
Allocates the next undo-group ID, or an invalid ID after exhaustion.
|
inlinenoexcept |
Returns the writer identity carried by this token.
|
delete |
|
noexcept |
Replaces this authority with other and invalidates other.
|
inlinenodiscardnoexcept |
Returns an opaque fingerprint that remains stable when this token moves.
|
friend |
|
friend |