Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

Modul The sk.ipesoft.sgcom.config obsahuje entity konfiguračnej databázy a triedy, ktoré konfiguračnú databázu obsluhujú.
Trieda ConfigurationManagerImpl predstavuje hlavnú triedu modulu, keď zapuzdruje prácu s objektmi EntityManagerFactoryEntityManager.
Trieda ConfigurationChangeTransactionImpl riadi spracovanie zmeny konfigurácie v rámci transakcie. Každá inštancia riadi jednu transakciu. Všetky príkazy na zmenu konfigurácie sú vkladané do fronty, z ktorej ich vyberá „vykonávacia slučka", bežiaca v samostatnom vlákne. Príkazy sú vykonávané dovtedy, kým niektorý z nich nespôsobí chybu konfigurácie – zaznamenaná v zozname errorMessages, alebo kým sa nevykoná príkaz commit alebo rollback module contains configuration database entities and classes that handle the configuration database.
The ConfigurationManagerImpl class represents the module's main class as it encapsulates work with EntityManagerFactory and EntityManager objects.
The ConfigurationChangeTransactionImpl class controls the processing of a configuration change within a transaction. Each instance manages one transaction. All configuration change commands are put into a queue from which they are selected by an "execution loop" running in a separate thread. The commands are executed until one of them causes a configuration error - recorded in the errorMessages list - or until a commit or rollback command is executed.