SPARK-1997 Update OrderServiceServer/FillStore to use SecurityOracle
This commit is contained in:
1 parent
bf72122edc
commit
20f42749dd
7 files changed
+68
-88
No files matched your search
@@ -5,6 +5,7 @@
|
||||
#include "lib/config/protos/jetfix.pb.h"
|
||||
#include "lib/config/protos/orderman_cfg.pb.h"
|
||||
#include "lib/md/MDConsumer.h"
|
||||
#include "lib/md/MDClient.h"
|
||||
#include "lib/mercury/actors/Timer.h"
|
||||
#include "lib/mercury/executor/Executor.h"
|
||||
#include "lib/metrics/metrics.h"
|
||||
@@ -88,11 +89,11 @@ ActorThread *find_thread_for_actor(
|
||||
|
||||
struct OrderServiceServer::PImpl {
|
||||
PImpl(bts::api::ServiceContext &ctx,
|
||||
std::shared_ptr<api::ISyntheticSecurityService> &ss,
|
||||
md::MDClient& mdc,
|
||||
DynamicOrderRegistry const &d, metrics::MetricsContainer &stats, trace::PerfLog &log)
|
||||
: service_bridge(), service_ready(false), known_orders(), known_fills(),
|
||||
publish_orders(), publish_fills(),
|
||||
admin_service(ctx.locate<api::admin::AdminService>()), cache(), md_consumer(ss, cache),
|
||||
admin_service(ctx.locate<api::admin::AdminService>()), md_consumer(mdc.current_consumer()),
|
||||
stats(stats), dyn_order_registry(d),log(log) {}
|
||||
|
||||
ServiceBridge *service_bridge;
|
||||
@@ -106,8 +107,7 @@ struct OrderServiceServer::PImpl {
|
||||
OrderServiceServer::OrdersPublisher publish_orders;
|
||||
OrderServiceServer::FillsPublisher publish_fills;
|
||||
api::admin::AdminService admin_service;
|
||||
md::SecurityCache cache;
|
||||
bts::md::MDConsumer md_consumer;
|
||||
bts::md::MDConsumer& md_consumer;
|
||||
metrics::MetricsContainer &stats;
|
||||
DynamicOrderRegistry const &dyn_order_registry;
|
||||
trace::PerfLog &log;
|
||||
@@ -115,10 +115,10 @@ struct OrderServiceServer::PImpl {
|
||||
|
||||
OrderServiceServer::OrderServiceServer(
|
||||
bts::api::ServiceContext &ctx,
|
||||
std::shared_ptr<api::ISyntheticSecurityService> &ss,
|
||||
md::MDClient& mdc,
|
||||
DynamicOrderRegistry const &d, metrics::MetricsContainer &stats,
|
||||
trace::PerfLog &log)
|
||||
: api::orderman::OrderServiceBase(ctx), me(new PImpl(ctx, ss, d, stats,log)) {
|
||||
: api::orderman::OrderServiceBase(ctx), me(new PImpl(ctx, mdc, d, stats,log)) {
|
||||
|
||||
me->publish_orders = make_orders_publisher();
|
||||
me->publish_fills = make_fills_publisher();
|
||||
@@ -138,6 +138,7 @@ OrderServiceServer::OrderServiceServer(
|
||||
bts_assert_msg(thread,
|
||||
"Could not find a configured thread for MDSource. See the "
|
||||
"OrdermanCfg key");
|
||||
|
||||
thread->executor.spawn<MDSource>(me->md_consumer, me->stats,log);
|
||||
|
||||
// OrderManager
|
||||
@@ -173,7 +174,7 @@ OrderServiceServer::OrderServiceServer(
|
||||
bts_assert_msg(thread,
|
||||
"Could not find a configured thread for FilllStore. See "
|
||||
"the OrdermanCfg key");
|
||||
thread->executor.spawn<FillStore>();
|
||||
thread->executor.spawn<FillStore>(mdc.oracle());
|
||||
|
||||
// SecuritySrc
|
||||
thread = find_thread_for_actor("SecuritySrc", me->actor_threads);
|
||||
|
||||
Reference in new issue
Block a user