Package com.compomics.util.threading
Class ObjectMutex
java.lang.Object
com.compomics.util.threading.ObjectMutex
This mutex can be used to manage threads editing experiment objects using
their key.
- Author:
- Marc Vaudel
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ObjectMutex
public ObjectMutex()Constructor.
-
-
Method Details
-
acquire
public void acquire(long key) Acquire function for the given key. If a thread gets interrupted an exception is thrown as runtime exception.- Parameters:
key- the object key
-
acquire
Acquire function for the given key. If a thread gets interrupted an exception is thrown as runtime exception.- Parameters:
key- the object key
-
release
public void release(long key) Release function for the given key.- Parameters:
key- the object key
-
release
Release function for the given key.- Parameters:
key- the object key
-