1. How to compare two DataServers?
If the Dataservers' displayNames are same and they have the same hashCode, then they are equal.
2. What the contract for this Dataserver?
3. What is the DataServer's core data structure?
There are three main data Map and a helper Map, the details are:
a) contractToStorage: Map[C, ArrayList[V]], DataContract -> Storage
b) subscribedContractToSer: Map[C, T], DataContract -> Tser
c) serToChainSers: Map[Tser, List[Tser]], Tser -> ChainSers
The helper Map is:
a) subscribedSymbolToContract: Map[String, DataContract]
It is used to quick search the contract, then to get the Storage or the Tser
All the method and logic are used to support these four Map.
4. What the event will the DataServer publish?
Totally two kinds of event,
the first one is HeartBeat(heartBeatInterval), it is published by a timer in the DataServer every `heartBeatInteval`. The default action when the DataServer received the HeartBeat is to loadFromSource(loadedTime) and postRefresh
loadFromSource will be overrided by the subclass.
The second kind of event is LoadHistory(afterTime). The default action when DataServer received the LoadHistory(afterTime) is also to loadFromSource(loadedTime) and postLoadHistory.
5. What does the postRefresh and postLoadHistory do?
Currently in the TickerServer, the postRefresh will firstly composeSer, then publish TSerEvent.Updated to the Tser. Tser also is a kind of publisher, TODO here.
6. What does the composeSer do?
composeSer will
compose the ticker(new ticker copied from the tickerSnapshot) in the subscribedContracts's storage
to Tser, that is to say the 1m quoteSer
7. What event will the TickerServer observer?
TickerServer extends DataServer, that is to say Ticker is a Publisher which will publish the HeartBeat(heartBeatInterval) and LoadHistory(afterTime) event to
itself.
TickerServer is a publisher and is also a Reactor, so it will listen to the Exchange.
Exchange will publish Opened(exchange: Exchange) and Closed(exchange: Exchange).
TickerServer has not define the action when it received the Opened and Closed event.
TickerServer also implements the traits ChangeObserver, so it will observe the tickerSnapshot.
When the tickerSnapshot notifies, the default action is TickerServer will create a new Ticker, copy the tickerSnapshot content to the new ticker, then save this new ticker into the storage(actually a ArrayList) of the DataServer. The tickerSnapshot is the latest tickerSnapshot, which means that it is always changing.
Question: how to track the new tickerSnapshot, observe it and unobserve it?
Ticker will subscribe a tickerContract, then it observe the tickerSnapshot <- Sec.lastData <- contract.symbol <- contract.
And unsubscribe is vice verse. contract -> contract.symbol -> Sec -> sec.lastData.tickerSnapShot.
分享到:
相关推荐
IBM Data Server .NET Provider,安装以后,使用.net添加引用。 安装后的目录一般是在: C:\Program Files\IBM\IBM DATA SERVER DRIVER\bin 下面 。添加引用以后就可以连接DB2了。 明细见: ...因网络不好,上传时可能...
IMB DB2 Data Server Driver驱动,附带DB2客户端的配置步骤及说明,在.Net下亲测可使用
IBM Data Server .NET Provider,安装以后,使用.net添加引用。 安装后的目录一般是在: C:\Program Files\IBM\IBM DATA SERVER DRIVER\bin 下面 。添加引用以后就可以连接DB2了。 明细见: ...
安装IBM Data Server .NET Provider 程序,安装成功后引用对应版本的IBM.Data.DB2.dll 文件,安装完成之后,如果是默认路径安装的,一般是在C:\Program Files\IBM\IBM DATA SERVER DRIVER\bin下面,具体的连接DB2...
安装IBM Data Server .NET Provider 程序,安装成功后引用对应版本的IBM.Data.DB2.dll ,文件路径:C:\Program Files\IBM\IBM DATA SERVER DRIVER\bin,具体数据库连接类见DB2Helper,实测成功读取数据
db2 catalog tcpip node node_name remote dashDB_IP_address server port db2 catalog database databasename as db_alias at node node_name db2 connect to db_alias user user_id 说明databasename必须与服务器...
Dataserver para muonline
解决Toad for DB2无法创建连接的情况,次工具可解决。
DB2数据库驱动程序
ArcGIS Spatial Data Server架构,安装和配置
GE_FANUC CNC DATA SERVER操作手册62694EN_03pdf,GE_FANUC CNC DATA SERVER操作手册62694EN_03
FANUC CNC Ethernet Board 和DATA Server Board操作手册63354EN_04pdf,FANUC CNC Ethernet Board 和DATA Server Board操作手册63354EN_04
QTP连接DB2,在进行数据源创建的时候,需要选择DB2驱动,网上说如果想连接DB2必须安装DB2 Run-Time Client Lite,找了半天也没有找到,让朋友帮忙找了下,原来在IBM的官网上改名了,在同事的帮助下终于找到了 希望对...
资源内容包括:IMB DB2 Data Server Driver、Db2连接工具、.net连接Db2帮助类和demo,使用的时候只要按格式设置好数据库名、服务器Ip,数据库账号、密码以及要访问的Sql语句就可能看到效果了,Demo包括MVC和控制台...
Source code DataServer Season 6 ep1
用于python连接DB2数据库用的。 该文件用于Windows32位系统,下载后一路默认安装
DB2驱动
DS Driver 支持开放源码和 Java™ 以及使用 ODBC、OLE DB 和 .NET Provider 的应用程序,version 9.7 ,windows x64平台,亲测可用。
ibm_data_server_client_winx64_v11.1 IBM_DB2_客户端6