public class MemoryHistoryStorage extends HistoryStorage
| Constructor and Description |
|---|
MemoryHistoryStorage(String accountId)
Constructs the in-memory history store instance with default parameters
|
MemoryHistoryStorage(String accountId,
String application)
Constructs the in-memory history store instance
|
| Modifier and Type | Method and Description |
|---|---|
List<MetatraderDeal> |
getDeals()
Returns all deals stored in history storage
|
List<MetatraderOrder> |
getHistoryOrders()
Returns all history orders stored in history storage
|
CompletableFuture<IsoTime> |
getLastDealTime()
Returns the time of the last history deal record stored in the history storage
|
CompletableFuture<IsoTime> |
getLastHistoryOrderTime()
Returns the time of the last history order record stored in the history storage
|
CompletableFuture<Void> |
loadData()
Loads history data from the file manager
|
CompletableFuture<Void> |
loadDataFromDisk()
Loads history data from the file manager.
|
CompletableFuture<Void> |
onDealAdded(MetatraderDeal newDeal)
Invoked when a new MetaTrader history deal is added
|
CompletableFuture<Void> |
onHistoryOrderAdded(MetatraderOrder historyOrder)
Invoked when a new MetaTrader history order is added
|
void |
reset()
Resets the storage
|
CompletableFuture<Void> |
updateDiskStorage()
Saves unsaved history items to disk storage.
|
CompletableFuture<Void> |
updateStorage()
Saves unsaved history items to storage
|
isDealSynchronizationFinished, isOrderSynchronizationFinished, onConnected, onDealSynchronizationFinished, onOrderSynchronizationFinishedonAccountInformationUpdated, onBrokerConnectionStatusChanged, onDisconnected, onOrderCompleted, onOrderUpdated, onPositionRemoved, onPositionUpdated, onSymbolPriceUpdated, onSymbolSpecificationUpdatedpublic MemoryHistoryStorage(String accountId)
accountId - account idpublic List<MetatraderDeal> getDeals()
HistoryStoragegetDeals in class HistoryStoragepublic List<MetatraderOrder> getHistoryOrders()
HistoryStoragegetHistoryOrders in class HistoryStoragepublic void reset()
HistoryStoragereset in class HistoryStoragepublic CompletableFuture<Void> loadData()
HistoryStorageloadData in class HistoryStoragepublic CompletableFuture<Void> loadDataFromDisk()
loadData().public CompletableFuture<Void> updateStorage()
HistoryStorageupdateStorage in class HistoryStoragepublic CompletableFuture<Void> updateDiskStorage()
updateStorage().public CompletableFuture<IsoTime> getLastHistoryOrderTime()
HistoryStoragegetLastHistoryOrderTime in class HistoryStoragepublic CompletableFuture<IsoTime> getLastDealTime()
HistoryStoragegetLastDealTime in class HistoryStoragepublic CompletableFuture<Void> onHistoryOrderAdded(MetatraderOrder historyOrder)
SynchronizationListeneronHistoryOrderAdded in class HistoryStoragehistoryOrder - new MetaTrader history orderpublic CompletableFuture<Void> onDealAdded(MetatraderDeal newDeal)
SynchronizationListeneronDealAdded in class HistoryStoragenewDeal - new MetaTrader history dealCopyright © 2020. All rights reserved.