Class Mutex
java.lang.Object
ecmwf.common.technical.Mutex
- All Implemented Interfaces:
AutoCloseable
ECMWF Product Data Store (OpenECPDS) Project
The Mutex class represents a mutual exclusion lock for a specific key. It has a reference to a Synchronized object,
which is used to manage locks on a per-key basis. The lock() method of the Mutex object acquires the lock for the
associated key by calling the lock() method of the underlying Synchronized object. The close() method of the Mutex
object releases the lock for the associated key by calling the free() method of the underlying Synchronized object.
This class provides a way to synchronize access to a shared resource on a per-key basis, which can help prevent data
corruption and other synchronization-related problems. *
- Since:
- 2024-07-01
- Version:
- 6.7.7
- Author:
- Laurent Gougeon invalid input: '<'syi@ecmwf.int>, ECMWF.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMutex(Synchronized sync, Object key) Instantiates a new mutex. -
Method Summary
-
Constructor Details
-
Mutex
Instantiates a new mutex.- Parameters:
sync- the synckey- the key
-
-
Method Details
-
lock
-
close
-