Package com.alibaba.graphscope.utils
Class FFITypeFactoryhelper
- java.lang.Object
-
- com.alibaba.graphscope.utils.FFITypeFactoryhelper
-
public class FFITypeFactoryhelper extends Object
-
-
Constructor Summary
Constructors Constructor Description FFITypeFactoryhelper()
-
Method Summary
-
-
-
Method Detail
-
newStringTypedArray
public static StringTypedArray newStringTypedArray()
The created typed array should be set address with baseTypedArray. One cannot add more data to this object- Returns:
-
newPrimitiveTypedArray
public static <T> PrimitiveTypedArray<T> newPrimitiveTypedArray(Class<? extends T> clz)
-
getStdStringFactory
public static StdString.Factory getStdStringFactory()
-
getVertexLongFactory
public static Vertex.Factory getVertexLongFactory()
-
getVertexIntegerFactory
public static Vertex.Factory getVertexIntegerFactory()
-
getVertexRangeLongFactory
public static VertexRange.Factory getVertexRangeLongFactory()
-
getVertexArrayFactory
public static VertexArray.Factory getVertexArrayFactory(String foreignTypeName)
-
getArrowArrayBuilderFactory
public static PrimitiveArrowArrayBuilder.Factory getArrowArrayBuilderFactory(String foreignTypeName)
-
newArrowArrayBuilder
public static <T> PrimitiveArrowArrayBuilder<T> newArrowArrayBuilder(Class<T> clz)
-
newUnsignedLongArrayBuilder
public static PrimitiveArrowArrayBuilder<Long> newUnsignedLongArrayBuilder()
-
getGSVertexArrayFactory
public static GSVertexArray.Factory getGSVertexArrayFactory(String foreignTypeName)
-
getDenseVertexSetFactory
public static DenseVertexSet.Factory getDenseVertexSetFactory()
-
getFFIVectorFactory
public static com.alibaba.fastffi.FFIVector.Factory getFFIVectorFactory(String foreignTypeName)
get the ffiVectorFactor which can produce std::vector, here foreignType can be nested- Parameters:
foreignTypeName
- foreign name (cpp name, full-qualified)- Returns:
- Factory instance.
-
getStdVectorFactory
public static StdVector.Factory getStdVectorFactory(String foreignName)
-
newDoublePrimitiveMsg
public static PrimitiveMessage<Double> newDoublePrimitiveMsg()
This is the same as DoubleMsg.factory.create();- Returns:
- created instance
-
newLongPrimitiveMsg
public static PrimitiveMessage<Long> newLongPrimitiveMsg()
-
newPrimitiveMsg
public static <T> PrimitiveMessage<T> newPrimitiveMsg(Class<T> clz)
Create the template msg instance.- Type Parameters:
T
- element type- Parameters:
clz
- element class instance.- Returns:
- created instance.
-
getPrimitiveMessageFactory
public static PrimitiveMessage.Factory getPrimitiveMessageFactory(String templateStr)
-
newVertexRangeLong
public static VertexRange<Long> newVertexRangeLong()
-
newVertexArray
public static <T> VertexArray<T,Long> newVertexArray(Class<T> clz)
-
newGSVertexArray
public static <T> GSVertexArray<T> newGSVertexArray(Class<T> clz)
-
newComplicateFFIVector
public static <T> com.alibaba.fastffi.FFIVector newComplicateFFIVector(Class<T> clz, Class<?>... types)
In case user want to create a nested std::vector instance. the foreign name translation relies on ffi method.- Type Parameters:
T
- outer class T.- Parameters:
clz
- outer class's Class object.types
- inner classes class objects.- Returns:
- created FFIVector
-
newDenseVertexSet
public static DenseVertexSet<Long> newDenseVertexSet()
-
getEmptyTypeFactory
public static EmptyType.Factory getEmptyTypeFactory()
-
createEmptyType
public static EmptyType createEmptyType()
-
newMessageInBuffer
public static MessageInBuffer.Factory newMessageInBuffer()
-
newLongMsg
public static LongMsg newLongMsg()
-
newLongMsg
public static LongMsg newLongMsg(long value)
-
newDoubleMsg
public static DoubleMsg newDoubleMsg()
-
newDoubleMsg
public static DoubleMsg newDoubleMsg(double value)
-
getForeignName
public static String getForeignName(com.alibaba.fastffi.FFIPointer ffiPointer)
For Any ffi-generated class, we can get the typealias via annotation- Parameters:
ffiPointer
- Java class generated by ffi.- Returns:
- foreignName
-
-