Is there any way to get the list of all FencedLocks?

71 views
Skip to first unread message

ImanDeh

unread,
Oct 5, 2023, 4:43:30 AM10/5/23
to Hazelcast
Hi,

I'm trying to get the list of all the FencedLocks. It seems the method getDistributedObjects doesn't return the FencedLocks!

Thanks in Advance

Andrii Rodionov

unread,
Oct 5, 2023, 6:56:32 AM10/5/23
to Hazelcast
Hello,

The getDistributedObjects method doesn't support CP objects.
You can use Metrics, to get information about Locks:

Regards,
Andrii

ImanDeh

unread,
Oct 5, 2023, 10:34:07 AM10/5/23
to Hazelcast
Hi Andrii,

Thanks for your reply. I actually wanted to destroy them. I'm creating them on-the-fly and needed to clean them out. I was looking for a way to get the list of all FencedLocks to call destroy method on them.

Andrii Rodionov

unread,
Oct 6, 2023, 6:09:40 AM10/6/23
to Hazelcast
Unfortunately, there is no direct way to do this.
You should have a reference for those Locks.
Maybe you can destroy the whole CP group (but it will also destroy all other CP data structures) https://docs.hazelcast.com/hazelcast/5.3/cp-subsystem/management#destroying-a-cp-group-by-force

Regards,
Andrii

Reply all
Reply to author
Forward
0 new messages