[JAVA] About synchronized and Reentrant Lock

A memo when reading the source when sharing logback between wars

--About the difference between synchronized block and Reentrant Lock. -More flexible and scalable locks in JDK 5.0 -Difference between lock and file lock

In logback

When outputting a file, finally ch.qos.logback.core.OutputStreamAppender #writeBytes (bite []) Write with /OutputStreamAppender.html#writeOut (E)). Locking is performed by ReentrantLock, including file opening processing, etc., and FileLock is Not performed.

Recommended Posts

About synchronized and Reentrant Lock
About synchronized and Reentrant Lock (Java & Kotlin implementation example)
About Bean and DI
About classes and instances
About gets and gets.chomp
About redirect and forward
Reentrant Lock guarantees order
About encapsulation and inheritance
About Serializable and serialVersionUID
About for statement and if statement
About Ruby hashes and symbols
[Java] About String and StringBuilder
About the same and equivalent
About classes and instances (evolution)
About pluck and ids methods
Consideration about classes and instances
About Java Packages and imports
About Ruby and object model
About Ruby classes and instances
About instance variables and attr_ *
About self-introduction and common errors
About Java static and non-static methods
About fastqc of Biocontainers and Java
Learn more about gems and bundlers
About the equals () and hashcode () methods
[Java beginner] About abstraction and interface
About Ruby single quotes and double quotes
About Gradle's setup phase and execution phase
About Ruby product operator (&) and sum operator (|)
About go get and go install from Go1.16
About removeAll and retainAll of ArrayList
About if statement and branch processing
About object-oriented inheritance and about yield Ruby
About Java primitive types and reference types
Consideration about Rails and Clean Architecture
This and that about Base64 (Java)
About Docker, disguise server and container