Hello fellow developers,
I have serializeable object that is stored across two Hazelcast members.
Object contains some info that can be changed on only one of the Hazelcast member at the same time.
For this purpose I am using ILock.
Everything is working fine until, Hazelcast member that acquired and holds lock for object decides to leave.
I want current Hazelcast member to wait for release its acquired and held locks before shutdown, so it can finish editing object.
As we discussed in comments (with @mdogan), there's no built-in mechanism for that.
To achieve what I wanted, I have to:
ConcurrentSkipListSet<String>
.ConcurrentSkipListSet<String>
check if ILock.isLocked()
, if true
then wait for release.