Package org.apache.cassandra.utils.btree
Class UpdateFunction.Simple<V>
- java.lang.Object
-
- org.apache.cassandra.utils.btree.UpdateFunction.Simple<V>
-
- All Implemented Interfaces:
com.google.common.base.Function<V,V>
,java.util.function.Function<V,V>
,UpdateFunction<V,V>
- Enclosing interface:
- UpdateFunction<K,V>
public static final class UpdateFunction.Simple<V> extends java.lang.Object implements UpdateFunction<V,V>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.cassandra.utils.btree.UpdateFunction
UpdateFunction.Simple<V>
-
-
Field Summary
-
Fields inherited from interface org.apache.cassandra.utils.btree.UpdateFunction
noOp
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
abortEarly()
void
allocated(long heapSize)
V
apply(V v)
V
apply(V replacing, V update)
static <V> UpdateFunction.Simple<V>
of(java.util.function.BiFunction<V,V,V> f)
-
-
-
Method Detail
-
apply
public V apply(V replacing, V update)
- Specified by:
apply
in interfaceUpdateFunction<V,V>
- Parameters:
replacing
- the value in the original tree we have matchedupdate
- the value in the updating collection that matched- Returns:
- the value to insert into the new tree
-
abortEarly
public boolean abortEarly()
- Specified by:
abortEarly
in interfaceUpdateFunction<V,V>
- Returns:
- true if we should fail the update
-
allocated
public void allocated(long heapSize)
- Specified by:
allocated
in interfaceUpdateFunction<V,V>
- Parameters:
heapSize
- extra heap space allocated (over previous tree)
-
of
public static <V> UpdateFunction.Simple<V> of(java.util.function.BiFunction<V,V,V> f)
-
-