[Info-vax] DCL, DLM, APIs, RAS, RuleWorks, etc
Arne Vajhøj
arne at vajhoej.dk
Thu Oct 27 19:25:40 EDT 2022
- Previous message (by thread): [Info-vax] DCL, DLM, APIs, RAS, RuleWorks, etc
- Next message (by thread): [Info-vax] DCL, DLM, APIs, RAS, RuleWorks, etc
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
On 10/27/2022 7:18 PM, Arne Vajhøj wrote:
> On 10/27/2022 5:20 PM, Dave Froble wrote:
>> But I confess to curiosity, what would a better API for the DLM look
>> like? I've used it from Basic, and anything one can use from Basic
>> has got to be rather simple.
> But if you want my take, then I think below would be good for 98% of cases.
>
> Procedural:
>
> lckid = lib$enqw(resnam, lockmode, flags)
> ...
> lib$deq(lckid)
>
> OO:
>
> lck = new Lock(resnam, flags)
> lck.get(lockmode)
> ...
> lck.release()
Locking is a common feature in distributed caches.
But they are often even simpler than above.
Hazelcast:
ILock lck = client.getLock(resnam);
lck.lock();
...
lck.unlock();
Apache Ignite:
Lock lck = cache.getLock(resnam);
lck.lock();
...
lck.unlock();
Arne
- Previous message (by thread): [Info-vax] DCL, DLM, APIs, RAS, RuleWorks, etc
- Next message (by thread): [Info-vax] DCL, DLM, APIs, RAS, RuleWorks, etc
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Info-vax
mailing list