Package org.apache.iotdb.db.wal.utils
Class WALWriteUtils
- java.lang.Object
-
- org.apache.iotdb.db.wal.utils.WALWriteUtils
-
public class WALWriteUtils extends java.lang.ObjectLikeReadWriteIOUtils
-
-
Field Summary
Fields Modifier and Type Field Description static intBOOLEAN_LENstatic intDOUBLE_LENstatic intFLOAT_LENstatic intINT_LENstatic intLONG_LENstatic intSHORT_LEN
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intsizeToWrite(org.apache.iotdb.tsfile.write.schema.MeasurementSchema measurementSchema)static intwrite(byte n, IWALByteBufferView buffer)write a byte n to byteBuffer.static intwrite(double n, IWALByteBufferView buffer)write a double n to byteBuffer.static intwrite(float n, IWALByteBufferView buffer)write a float n to byteBuffer.static intwrite(int n, IWALByteBufferView buffer)write a int n to byteBuffer.static intwrite(long n, IWALByteBufferView buffer)write a long n to byteBuffer.static intwrite(short n, IWALByteBufferView buffer)write a short n to byteBuffer.static intwrite(java.lang.Boolean flag, IWALByteBufferView buffer)write a byte to byteBuffer according to flag.static intwrite(java.lang.String s, IWALByteBufferView buffer)write string to byteBuffer.static intwrite(org.apache.iotdb.tsfile.file.metadata.enums.CompressionType compressionType, IWALByteBufferView buffer)CompressionType.static intwrite(org.apache.iotdb.tsfile.file.metadata.enums.TSDataType dataType, IWALByteBufferView buffer)TSDataType.static intwrite(org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding encoding, IWALByteBufferView buffer)TSEncoding.static intwrite(org.apache.iotdb.tsfile.utils.Binary n, IWALByteBufferView buffer)write a short n to byteBuffer.static intwrite(org.apache.iotdb.tsfile.write.schema.MeasurementSchema measurementSchema, IWALByteBufferView buffer)MeasurementSchema.
-
-
-
Field Detail
-
BOOLEAN_LEN
public static final int BOOLEAN_LEN
- See Also:
- Constant Field Values
-
SHORT_LEN
public static final int SHORT_LEN
- See Also:
- Constant Field Values
-
INT_LEN
public static final int INT_LEN
- See Also:
- Constant Field Values
-
LONG_LEN
public static final int LONG_LEN
- See Also:
- Constant Field Values
-
DOUBLE_LEN
public static final int DOUBLE_LEN
- See Also:
- Constant Field Values
-
FLOAT_LEN
public static final int FLOAT_LEN
- See Also:
- Constant Field Values
-
-
Method Detail
-
write
public static int write(java.lang.Boolean flag, IWALByteBufferView buffer)write a byte to byteBuffer according to flag. If flag is true, write 1, else write 0.
-
write
public static int write(byte n, IWALByteBufferView buffer)write a byte n to byteBuffer.- Returns:
- The number of bytes used to represent a
bytevalue in two's complement binary form.
-
write
public static int write(short n, IWALByteBufferView buffer)write a short n to byteBuffer.- Returns:
- The number of bytes used to represent n.
-
write
public static int write(org.apache.iotdb.tsfile.utils.Binary n, IWALByteBufferView buffer)write a short n to byteBuffer.- Returns:
- The number of bytes used to represent n.
-
write
public static int write(int n, IWALByteBufferView buffer)write a int n to byteBuffer.- Returns:
- The number of bytes used to represent n.
-
write
public static int write(long n, IWALByteBufferView buffer)write a long n to byteBuffer.
-
write
public static int write(float n, IWALByteBufferView buffer)write a float n to byteBuffer.
-
write
public static int write(double n, IWALByteBufferView buffer)write a double n to byteBuffer.
-
write
public static int write(java.lang.String s, IWALByteBufferView buffer)write string to byteBuffer.- Returns:
- the length of string represented by byte[].
-
write
public static int write(org.apache.iotdb.tsfile.file.metadata.enums.TSDataType dataType, IWALByteBufferView buffer)TSDataType.
-
write
public static int write(org.apache.iotdb.tsfile.file.metadata.enums.TSEncoding encoding, IWALByteBufferView buffer)TSEncoding.
-
write
public static int write(org.apache.iotdb.tsfile.file.metadata.enums.CompressionType compressionType, IWALByteBufferView buffer)CompressionType.
-
write
public static int write(org.apache.iotdb.tsfile.write.schema.MeasurementSchema measurementSchema, IWALByteBufferView buffer)MeasurementSchema.
-
sizeToWrite
public static int sizeToWrite(org.apache.iotdb.tsfile.write.schema.MeasurementSchema measurementSchema)
-
-