Class Synchronized

java.lang.Object
ecmwf.common.technical.Synchronized

public final class Synchronized extends Object
The Class Synchronized.
  • Constructor Details Link icon

    • Synchronized Link icon

      public Synchronized()
  • Method Details Link icon

    • getInstance Link icon

      public static Synchronized getInstance(Class<?> clazz)
      Gets the single instance of Synchronized.
      Parameters:
      clazz - the clazz
      Returns:
      single instance of Synchronized
    • getSize Link icon

      public static long getSize()
      Gets the total number of elements for all instances.
      Returns:
      total number of elements for all instances
    • getMutex Link icon

      public Mutex getMutex(Object key)
      Gets the Mutex for the specified key.
      Parameters:
      key - the key
      Returns:
      the mutex
    • lock Link icon

      public Object lock(Object key)
      Retrieve an object to synchronize for the given key.
      Parameters:
      key - the key
      Returns:
      the object
    • free Link icon

      public boolean free(Object key)
      Free the object related to the given key.
      Parameters:
      key - the key
      Returns:
      true, if successful