---
# System prepended metadata

title: UML

---

# UML

```plantuml
@startuml
Machine -> Local: makeTransaction(Data)
activate Local

loop Cache has no available memory
Local -> Cache: checksMemory()
activate Cache
Local <-- Cache: hasAvailableMemory
deactivate Cache
end


Local -> Cache: commitTransaction(Data, Id)



par 
Local -> Local: async writeRemoteDatabase(Id)
activate Local
Local -> Cache: getTransaction(Id)
activate Cache
Cache --> Local : Transaction
deactivate Cache
Local -> RemoteDB : commitTransaction(Transaction, Id)
activate RemoteDB
RemoteDB --> Local : Id

deactivate RemoteDB

Local -> Cache: removeTransaction(id)


Local -> DBAdmin : onDataReplicationCompleted(Id, currentTime)
deactivate Local
end

Local --> Machine :Id
deactivate Local

@enduml
```


```plantuml
@startuml
DBAdmin -> RemoteDB : RequestTransactions(startTime, endTime)
activate RemoteDB
RemoteDB --> DBAdmin: vector<Transaction>
deactivate RemoteDB
DBAdmin -> Local: addRecoveredTransactions(vector<Transaction>)

@enduml
```
