/
githubmirror
/
java-design-patterns
Обзор
Документация
Войти
/
githubmirror
/
java-design-patterns
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
open-source-java-design-patterns-1st-edition
log-aggregation/etc/log-aggregation.puml
51 строка
1 KB
YongHwan Kwon
feat: Add Microservice Pattern, Log aggregation (#2690) (#2719)
27 дек 2023, 09:06
Не верифицирован
27 дек 2023, 09:06
cd2dbb7
Код
Авторство
О чём код?
@startuml package com.iluwatar.logaggregation { class App { + main(args: String[]) {static} } class CentralLogStore { - logs: ConcurrentLinkedQueue<LogEntry> + storeLog(logEntry: LogEntry) + displayLogs() } class LogAggregator { - BUFFER_THRESHOLD: int {static} - centralLogStore: CentralLogStore - buffer: ConcurrentLinkedQueue<LogEntry> - minLogLevel: LogLevel - executorService: ExecutorService - logCount: AtomicInteger + collectLog(logEntry: LogEntry) + stop() } class LogEntry { - serviceName: String - level: LogLevel - message: String - timestamp: LocalDateTime } enum LogLevel { DEBUG INFO ERROR } class LogProducer { - serviceName: String - aggregator: LogAggregator + generateLog(level: LogLevel, message: String) } } LogProducer --> "-aggregator" LogAggregator LogAggregator --> "-centralLogStore" CentralLogStore LogAggregator --> "-buffer" LogEntry CentralLogStore --> "-logs" LogEntry @enduml