Class HashLock


  • public class HashLock
    extends java.lang.Object
    This class manages an array of locks and use the hash code of an object as an index of the array to find the corresponding lock, so that the operations on the same key (string) can be prevented while the number of locks remain controlled.
    • Constructor Summary

      Constructors 
      Constructor Description
      HashLock()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void readLock​(java.lang.Object obj)  
      void readUnlock​(java.lang.Object obj)  
      void writeLock​(java.lang.Object obj)  
      void writeUnlock​(java.lang.Object obj)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HashLock

        public HashLock()
    • Method Detail

      • readLock

        public void readLock​(java.lang.Object obj)
      • readUnlock

        public void readUnlock​(java.lang.Object obj)
      • writeLock

        public void writeLock​(java.lang.Object obj)
      • writeUnlock

        public void writeUnlock​(java.lang.Object obj)