How to keep a counter atomic?
There are three ways to keep a counter atomic: synchronized keyword, Atomic type, Adder type. The test case compares the efficiency of the 3 ways.
Transmit Value by Customized Annotation in AOP Interception
Annotation can uncouple components from business operations. Transmission of value from business module to custom components using customized annotation is demonstrated.
Solutions for Session Consistency Problem in Web Cluster
List & compare three solutions for session consistency problem in web cluster: ip_hash, session duplication, concentrated cache.
An Enhanced Prototype of Producer-Consumer
In the context of multiple producers and consumers, the same times of producing and consuming occur alternately. Evidently, the max length minuses the min length of the queue is value of the same times.
A Prototype of Producer-Consumer
A queue supporting producers and consumers.