Class HashMapStringLocks

java.lang.Object
com.mapr.baseutils.utils.HashMapStringLocks

public class HashMapStringLocks extends Object
  • Field Details

    • LOG

      public static final org.slf4j.Logger LOG
  • Constructor Details

    • HashMapStringLocks

      public HashMapStringLocks()
  • Method Details

    • lock

      public void lock(String key)
    • tryLock

      public boolean tryLock(String key)
      Attempts to obtain the lock of the object corresponding to the argument. Returns 'true' if the lock could be taken or 'false' otherwise
      Parameters:
      key -
      Returns:
      'true' if the lock could be taken or 'false' otherwise
    • unlock

      public void unlock(String key)