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 Modifier and Type Field Description static org.infinispan.commons.marshall.AdvancedExternalizer<UnlockFunction>EXTERNALIZER
-
Constructor Summary
Constructors Constructor Description UnlockFunction(Object requestor)UnlockFunction(String requestId, Set<Object> requestors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Booleanapply(org.infinispan.functional.EntryView.ReadWriteEntryView<ClusteredLockKey,ClusteredLockValue> entryView)
-
-
-
Field Detail
-
EXTERNALIZER
public static final org.infinispan.commons.marshall.AdvancedExternalizer<UnlockFunction> EXTERNALIZER
-
-
Method Detail
-
apply
public Boolean apply(org.infinispan.functional.EntryView.ReadWriteEntryView<ClusteredLockKey,ClusteredLockValue> entryView)
- Specified by:
applyin interfaceFunction<org.infinispan.functional.EntryView.ReadWriteEntryView<ClusteredLockKey,ClusteredLockValue>,Boolean>
-
-