You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Thomas Vandahl (Jira)" <ji...@apache.org> on 2020/08/21 13:20:01 UTC

[jira] [Closed] (JCS-119) replace synchronized blocks by java locks or concurrenhashmap

     [ https://issues.apache.org/jira/browse/JCS-119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Vandahl closed JCS-119.
------------------------------

Close after release

> replace synchronized blocks by java locks or concurrenhashmap
> -------------------------------------------------------------
>
>                 Key: JCS-119
>                 URL: https://issues.apache.org/jira/browse/JCS-119
>             Project: Commons JCS
>          Issue Type: Improvement
>            Reporter: Romain Manni-Bucau
>            Assignee: Thomas Vandahl
>            Priority: Major
>             Fix For: jcs-3.0
>
>
> A cache is typically used in a concurrent environment. Since Java 6 using a ReentrantLock is faster than synchronized so can be interesting to replace synchronized blocks by a lock.
> Places i'm thinking about:
> * CompositeCache
> * AbstractDoubleLinkedListMemoryCache
> * LHMLRUMemoryCache
> * DoubleLinkedList
> * LRUMap
> * SingleLinkedList
> * SortedPreferentialArray
> Some places where replacing a HashMap by a ConcurrentHashMap can allow to get rid of synchronized without needing a lock:
> * CacheEventQueue
> * AbstractDiskCache
> * CacheWatchRepairable
> There are other places but this is the main I saw.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)