public abstract class HistoryStorage extends SynchronizationListener
| Constructor and Description |
|---|
HistoryStorage() |
| Modifier and Type | Method and Description |
|---|---|
abstract List<MetatraderDeal> |
getDeals()
Returns all deals stored in history storage
|
abstract List<MetatraderOrder> |
getHistoryOrders()
Returns all history orders stored in history storage
|
abstract CompletableFuture<IsoTime> |
getLastDealTime()
Returns the time of the last history deal record stored in the history storage
|
abstract CompletableFuture<IsoTime> |
getLastHistoryOrderTime()
Returns the time of the last history order record stored in the history storage
|
boolean |
isDealSynchronizationFinished()
Returns flag indicating whether deal history synchronization have finished
|
boolean |
isOrderSynchronizationFinished()
Returns flag indicating whether order history synchronization have finished
|
abstract CompletableFuture<Void> |
loadData()
Loads history data from the file manager
|
CompletableFuture<Void> |
onConnected()
Invoked when connection to MetaTrader terminal established
|
abstract CompletableFuture<Void> |
onDealAdded(MetatraderDeal deal)
Invoked when a new MetaTrader history deal is added
|
CompletableFuture<Void> |
onDealSynchronizationFinished(String synchronizationId)
Invoked when a synchronization of history deals on a MetaTrader account have finished
|
abstract CompletableFuture<Void> |
onHistoryOrderAdded(MetatraderOrder historyOrder)
Invoked when a new MetaTrader history order is added
|
CompletableFuture<Void> |
onOrderSynchronizationFinished(String synchronizationId)
Invoked when a synchronization of history orders on a MetaTrader account have finished
|
abstract void |
reset()
Resets the storage
|
abstract CompletableFuture<Void> |
updateStorage()
Saves unsaved history items to storage
|
onAccountInformationUpdated, onBrokerConnectionStatusChanged, onDisconnected, onOrderCompleted, onOrdersReplaced, onOrderUpdated, onPositionRemoved, onPositionsReplaced, onPositionUpdated, onSymbolPriceUpdated, onSymbolSpecificationUpdated, onSynchronizationStartedpublic abstract List<MetatraderDeal> getDeals()
public abstract List<MetatraderOrder> getHistoryOrders()
public abstract void reset()
public abstract CompletableFuture<Void> loadData()
public abstract CompletableFuture<Void> updateStorage()
public boolean isOrderSynchronizationFinished()
public boolean isDealSynchronizationFinished()
public abstract CompletableFuture<IsoTime> getLastHistoryOrderTime()
public abstract CompletableFuture<IsoTime> getLastDealTime()
public abstract CompletableFuture<Void> onHistoryOrderAdded(MetatraderOrder historyOrder)
SynchronizationListeneronHistoryOrderAdded in class SynchronizationListenerhistoryOrder - new MetaTrader history orderpublic abstract CompletableFuture<Void> onDealAdded(MetatraderDeal deal)
SynchronizationListeneronDealAdded in class SynchronizationListenerdeal - new MetaTrader history dealpublic CompletableFuture<Void> onDealSynchronizationFinished(String synchronizationId)
SynchronizationListeneronDealSynchronizationFinished in class SynchronizationListenersynchronizationId - synchronization request idpublic CompletableFuture<Void> onOrderSynchronizationFinished(String synchronizationId)
SynchronizationListeneronOrderSynchronizationFinished in class SynchronizationListenersynchronizationId - synchronization request idpublic CompletableFuture<Void> onConnected()
SynchronizationListeneronConnected in class SynchronizationListenerCopyright © 2020. All rights reserved.