Class UnlockFunction
java.lang.Object
org.infinispan.lock.impl.functions.UnlockFunction
- All Implemented Interfaces:
Function<org.infinispan.functional.EntryView.ReadWriteEntryView<ClusteredLockKey,ClusteredLockValue>, Boolean>
public class UnlockFunction
extends Object
implements Function<org.infinispan.functional.EntryView.ReadWriteEntryView<ClusteredLockKey,ClusteredLockValue>,Boolean>
Function that allows to unlock the lock, if it's not already released.
- If the requestor is not the owner, the lock won't be released.
- If the requestId is null, this value does not affect the unlock
- If the requestId is not null, the lock will be released only if the requestId and the owner match
- If lock is already released, nothing happens
- Since:
- 9.2
- Author:
- Katia Aresti, karesti@redhat.com
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUnlockFunction(Object requestor) UnlockFunction(String requestId, Set<Object> requestors) -
Method Summary
Modifier and TypeMethodDescriptionapply(org.infinispan.functional.EntryView.ReadWriteEntryView<ClusteredLockKey, ClusteredLockValue> entryView)
-
Field Details
-
EXTERNALIZER
-
-
Constructor Details
-
UnlockFunction
-
UnlockFunction
-
-
Method Details
-
apply
public Boolean apply(org.infinispan.functional.EntryView.ReadWriteEntryView<ClusteredLockKey, ClusteredLockValue> entryView) - Specified by:
applyin interfaceFunction<org.infinispan.functional.EntryView.ReadWriteEntryView<ClusteredLockKey,ClusteredLockValue>, Boolean>
-