Skip to content

Instantly share code, notes, and snippets.

Avatar

Pablo Moretti pablomoretti

  • MercadoLibre
  • Argentina
View GitHub Profile
@pablomoretti
pablomoretti / LockByName
Created Dec 22, 2013
Get lock by name using java.util.concurrent
View LockByName
package com.mercadolibre.concurrent;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.ReentrantLock;
public class LockByName<L> {
ConcurrentHashMap<String, L> mapStringLock;
public LockByName(){