Class CreateAndCASFunction<K extends CounterKey>
- java.lang.Object
-
- org.infinispan.counter.impl.function.CreateAndCASFunction<K>
-
- All Implemented Interfaces:
Function<org.infinispan.functional.EntryView.ReadWriteEntryView<K,CounterValue>,Object>
public class CreateAndCASFunction<K extends CounterKey> extends Object
The compare-and-swap function to update theCounterValue.It has the same semantic as
CompareAndSwapFunctionbut it creates theCounterValueif it doesn't exist.- Since:
- 9.2
- Author:
- Pedro Ruivo
- See Also:
CompareAndSwapFunction
-
-
Field Summary
Fields Modifier and Type Field Description static org.infinispan.commons.marshall.AdvancedExternalizer<CreateAndCASFunction>EXTERNALIZER
-
Constructor Summary
Constructors Constructor Description CreateAndCASFunction(org.infinispan.counter.api.CounterConfiguration configuration, long expect, long value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rapply(org.infinispan.functional.EntryView.ReadWriteEntryView<K,CounterValue> entryView)
-
-
-
Field Detail
-
EXTERNALIZER
public static final org.infinispan.commons.marshall.AdvancedExternalizer<CreateAndCASFunction> EXTERNALIZER
-
-
Method Detail
-
apply
public final R apply(org.infinispan.functional.EntryView.ReadWriteEntryView<K,CounterValue> entryView)
- Specified by:
applyin interfaceFunction<K extends CounterKey,R>
-
-