OpenPit C++ SDK
C++17 SDK for the OpenPit pre-trade risk engine
openpit::asyncengine Namespace Reference

Classes

struct  AdjustmentOutcome
 Result value for an async account-adjustment batch. More...
 
class  AsyncAccounts
 Async account-administration view. More...
 
class  AsyncDropCopyOperation
 Async wrapper around an applied drop-copy operation. More...
 
class  AsyncEngine
 Account-pinned async facade over a synchronous driver object. More...
 
class  AsyncRequest
 Async wrapper around a start-stage request. More...
 
class  AsyncReservation
 Async wrapper around an accepted pre-trade reservation. More...
 
class  Builder
 Entry builder for selecting async strategy and common options. More...
 
struct  DropCopyOutcome
 Result value for an async drop-copy call. More...
 
class  DynamicBuilder
 Builder stage for demand-created per-account queues. More...
 
class  EngineAdapter
 Adapter that exposes openpit::Engine methods to TypedAsyncEngine. More...
 
class  Error
 Async dispatch failure carried by a future or lifecycle API. More...
 
struct  ExecuteOutcome
 Result value for an async full pre-trade call. More...
 
class  Future
 Consumer side of an async operation returning one value. More...
 
class  NoopObserver
 
class  Observer
 
class  OwnedTypedAsyncEngine
 Owning typed async engine built over the default EngineAdapter. More...
 
class  PairFuture
 Consumer side of an async operation returning two values. More...
 
class  PairPromise
 Producer side for PairFuture<A, B>. More...
 
class  Promise
 Producer side used by the dispatcher to resolve a Future<T>. More...
 
class  Result
 Resolved payload of a future: either a value or an async error. More...
 
class  ShardedBuilder
 Builder stage for a fixed number of account shards. More...
 
struct  StartOutcome
 Result value for an async start-stage call. More...
 
class  TypedAsyncEngine
 Typed async facade exposing named OpenPit engine operations. More...
 
class  TypedBuilder
 Entry builder for TypedAsyncEngine. More...
 
class  TypedDynamicBuilder
 Typed builder stage for demand-created account queues. More...
 
class  TypedShardedBuilder
 Typed builder stage for a fixed number of account shards. More...
 

Typedefs

template<typename T >
using Payload = std::conditional_t< std::is_copy_constructible_v< T >, Result< T >, std::unique_ptr< Result< T > >>
 
using StopUnderlying = std::function< void()>
 
using SubmitAbortHandler = std::function< void(Promise< std::monostate > promise, Error error, bool inAccountLane)>
 

Enumerations

enum class  ErrorCode : std::uint8_t {
  Stopped , QueueLimit , MissingAccountId , SubmitCancelled ,
  TaskFailed , ValueConsumed
}
 

Functions

OwnedTypedAsyncEngine MakeTypedAsyncEngine (::openpit::Engine &&, std::size_t)=delete
 
OwnedTypedAsyncEngine MakeTypedAsyncEngine (const ::openpit::Engine &&, std::size_t)=delete
 
OwnedTypedAsyncEngine MakeTypedAsyncEngine (const ::openpit::Engine &engine, std::size_t workers)
 Builds a sharded typed async engine over openpit::Engine. More...
 

Typedef Documentation

◆ Payload

template<typename T >
using openpit::asyncengine::Payload = typedef std::conditional_t<std::is_copy_constructible_v<T>, Result<T>, std::unique_ptr<Result<T> >>

◆ StopUnderlying

using openpit::asyncengine::StopUnderlying = typedef std::function<void()>

◆ SubmitAbortHandler

using openpit::asyncengine::SubmitAbortHandler = typedef std::function<void(Promise<std::monostate> promise, Error error, bool inAccountLane)>

Enumeration Type Documentation

◆ ErrorCode

enum openpit::asyncengine::ErrorCode : std::uint8_t
strong
Enumerator
Stopped 
QueueLimit 
MissingAccountId 
SubmitCancelled 
TaskFailed 
ValueConsumed 

Function Documentation

◆ MakeTypedAsyncEngine() [1/3]

OwnedTypedAsyncEngine openpit::asyncengine::MakeTypedAsyncEngine ( ::openpit::Engine &&  ,
std::size_t   
)
delete

◆ MakeTypedAsyncEngine() [2/3]

OwnedTypedAsyncEngine openpit::asyncengine::MakeTypedAsyncEngine ( const ::openpit::Engine &&  ,
std::size_t   
)
delete

◆ MakeTypedAsyncEngine() [3/3]

OwnedTypedAsyncEngine openpit::asyncengine::MakeTypedAsyncEngine ( const ::openpit::Engine engine,
std::size_t  workers 
)
inline

Builds a sharded typed async engine over openpit::Engine.