Package com.alibaba.graphscope.utils
Class AtomicLongArrayWrapper
- java.lang.Object
-
- com.alibaba.graphscope.utils.AtomicLongArrayWrapper
-
public class AtomicLongArrayWrapper extends Object
-
-
Constructor Summary
Constructors Constructor Description AtomicLongArrayWrapper(int s)
AtomicLongArrayWrapper(int s, long defaultValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
compareAndSet(int ind, long newValue)
void
compareAndSetMin(int ind, long newValue)
void
compareAndSetMin(long ind, long newValue)
void
compareAndSetMin(Vertex<Long> vertex, long newValue)
void
compareAndSetMinUnsigned(long vertexId, long newValue)
Atomically update the array, compare values using unsigned comparison.void
compareAndSetMinUnsigned(Vertex<Long> vertex, long newValue)
Atomically update the array, compare values using unsigned comparison.long
get(int ind)
long
get(long ind)
long
get(Vertex<Long> vertex)
int
getSize()
void
set(int ind, long newValue)
void
set(long newValue)
void
set(long ind, long newValue)
void
set(Vertex<Long> vertex, long newValue)
-
-
-
Method Detail
-
get
public long get(int ind)
-
get
public long get(long ind)
-
set
public void set(int ind, long newValue)
-
set
public void set(long ind, long newValue)
-
set
public void set(long newValue)
-
compareAndSetMin
public void compareAndSetMin(int ind, long newValue)
-
compareAndSetMin
public void compareAndSetMin(long ind, long newValue)
-
compareAndSet
public void compareAndSet(int ind, long newValue)
-
compareAndSetMinUnsigned
public void compareAndSetMinUnsigned(Vertex<Long> vertex, long newValue)
Atomically update the array, compare values using unsigned comparison.- Parameters:
vertex
- querying vertex.newValue
- new value.
-
compareAndSetMinUnsigned
public void compareAndSetMinUnsigned(long vertexId, long newValue)
Atomically update the array, compare values using unsigned comparison.- Parameters:
vertexId
- querying vertex id.newValue
- new value.
-
getSize
public int getSize()
-
-