Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BitsUtil

Hierarchy

  • BitsUtil

Index

Properties

Static BEGIN_END_FLAG

BEGIN_END_FLAG: number = BitsUtil.BEGIN_FLAG | BitsUtil.END_FLAG

Static BEGIN_FLAG

BEGIN_FLAG: number = 128

Static BIG_ENDIAN

BIG_ENDIAN: number = 2

Static BOOLEAN_SIZE_IN_BYTES

BOOLEAN_SIZE_IN_BYTES: number = 1

Static BYTE_SIZE_IN_BYTES

BYTE_SIZE_IN_BYTES: number = 1

Static CHAR_SIZE_IN_BYTES

CHAR_SIZE_IN_BYTES: number = 2

Static CORRELATION_ID_FIELD_OFFSET

CORRELATION_ID_FIELD_OFFSET: number = BitsUtil.TYPE_FIELD_OFFSET + BitsUtil.SHORT_SIZE_IN_BYTES

Static DATA_OFFSET_FIELD_OFFSET

DATA_OFFSET_FIELD_OFFSET: number = BitsUtil.PARTITION_ID_FIELD_OFFSET + BitsUtil.INT_SIZE_IN_BYTES

Static DOUBLE_SIZE_IN_BYTES

DOUBLE_SIZE_IN_BYTES: number = 8

Static END_FLAG

END_FLAG: number = 64

Static EVENT_CACHE

EVENT_CACHE: number = 210

Static EVENT_CACHEBATCHINVALIDATION

EVENT_CACHEBATCHINVALIDATION: number = 211

Static EVENT_CACHEINVALIDATION

EVENT_CACHEINVALIDATION: number = 208

Static EVENT_CACHEPARTITIONLOST

EVENT_CACHEPARTITIONLOST: number = 214

Static EVENT_DISTRIBUTEDOBJECT

EVENT_DISTRIBUTEDOBJECT: number = 207

Static EVENT_ENTRY

EVENT_ENTRY: number = 203

Static EVENT_IMAPBATCHINVALIDATION

EVENT_IMAPBATCHINVALIDATION: number = 216

Static EVENT_IMAPINVALIDATION

EVENT_IMAPINVALIDATION: number = 215

Static EVENT_ITEM

EVENT_ITEM: number = 204

Static EVENT_MAPPARTITIONLOST

EVENT_MAPPARTITIONLOST: number = 209

Static EVENT_MEMBER

EVENT_MEMBER: number = 200

Static EVENT_MEMBERATTRIBUTECHANGE

EVENT_MEMBERATTRIBUTECHANGE: number = 202

Static EVENT_MEMBERLIST

EVENT_MEMBERLIST: number = 201

Static EVENT_PARTITIONLOST

EVENT_PARTITIONLOST: number = 206

Static EVENT_PARTITIONS

EVENT_PARTITIONS: number = 217

Static EVENT_QUERYCACHEBATCH

EVENT_QUERYCACHEBATCH: number = 213

Static EVENT_QUERYCACHESINGLE

EVENT_QUERYCACHESINGLE: number = 212

Static EVENT_TOPIC

EVENT_TOPIC: number = 205

Static FLAGS_FIELD_OFFSET

FLAGS_FIELD_OFFSET: number = BitsUtil.VERSION_FIELD_OFFSET + BitsUtil.BYTE_SIZE_IN_BYTES

Static FLOAT_SIZE_IN_BYTES

FLOAT_SIZE_IN_BYTES: number = 4

Static FRAME_LENGTH_FIELD_OFFSET

FRAME_LENGTH_FIELD_OFFSET: number = 0

Static HEADER_SIZE

HEADER_SIZE: number = BitsUtil.DATA_OFFSET_FIELD_OFFSET + BitsUtil.SHORT_SIZE_IN_BYTES

Static INT_SIZE_IN_BYTES

INT_SIZE_IN_BYTES: number = 4

Static LISTENER_FLAG

LISTENER_FLAG: number = 1

Static LITTLE_ENDIAN

LITTLE_ENDIAN: number = 1

Static LONG_SIZE_IN_BYTES

LONG_SIZE_IN_BYTES: number = 8

Static NULL_ARRAY_LENGTH

NULL_ARRAY_LENGTH: number = -1

Static PARTITION_ID_FIELD_OFFSET

PARTITION_ID_FIELD_OFFSET: number = BitsUtil.CORRELATION_ID_FIELD_OFFSET + BitsUtil.LONG_SIZE_IN_BYTES

Static SHORT_SIZE_IN_BYTES

SHORT_SIZE_IN_BYTES: number = 2

Static SIZE_OFFSET

SIZE_OFFSET: number = 0

Static TYPE_FIELD_OFFSET

TYPE_FIELD_OFFSET: number = BitsUtil.FLAGS_FIELD_OFFSET + BitsUtil.BYTE_SIZE_IN_BYTES

Static VERSION

VERSION: number = 1

Static VERSION_FIELD_OFFSET

VERSION_FIELD_OFFSET: number = BitsUtil.FRAME_LENGTH_FIELD_OFFSET + BitsUtil.INT_SIZE_IN_BYTES

Methods

Static calculateSizeAddress

  • calculateSizeAddress(value: Address): number

Static calculateSizeBuffer

  • calculateSizeBuffer(value: Buffer): number

Static calculateSizeData

  • calculateSizeData(data: Data): number

Static calculateSizeString

  • calculateSizeString(value: string): number

Static getStringSize

  • getStringSize(value: string, nullable?: boolean): number
  • Parameters

    • value: string
    • Default value nullable: boolean = false

    Returns number

Static readDouble

  • readDouble(buffer: Buffer, pos: number, isBigEndian: boolean): number
  • Parameters

    • buffer: Buffer
    • pos: number
    • isBigEndian: boolean

    Returns number

Static readFloat

  • readFloat(buffer: Buffer, pos: number, isBigEndian: boolean): number
  • Parameters

    • buffer: Buffer
    • pos: number
    • isBigEndian: boolean

    Returns number

Static readInt16

  • readInt16(buffer: Buffer, pos: number, isBigEndian: boolean): number
  • Parameters

    • buffer: Buffer
    • pos: number
    • isBigEndian: boolean

    Returns number

Static readInt32

  • readInt32(buffer: Buffer, pos: number, isBigEndian: boolean): number
  • Parameters

    • buffer: Buffer
    • pos: number
    • isBigEndian: boolean

    Returns number

Static readInt8

  • readInt8(buffer: Buffer, pos: number): number
  • Parameters

    • buffer: Buffer
    • pos: number

    Returns number

Static readUInt16

  • readUInt16(buffer: Buffer, pos: number, isBigEndian: boolean): number
  • Parameters

    • buffer: Buffer
    • pos: number
    • isBigEndian: boolean

    Returns number

Static readUInt32

  • readUInt32(buffer: Buffer, pos: number, isBigEndian: boolean): number
  • Parameters

    • buffer: Buffer
    • pos: number
    • isBigEndian: boolean

    Returns number

Static readUInt8

  • readUInt8(buffer: Buffer, pos: number): number
  • Parameters

    • buffer: Buffer
    • pos: number

    Returns number

Static writeDouble

  • writeDouble(buffer: Buffer, pos: number, val: number, isBigEndian: boolean): void
  • Parameters

    • buffer: Buffer
    • pos: number
    • val: number
    • isBigEndian: boolean

    Returns void

Static writeFloat

  • writeFloat(buffer: Buffer, pos: number, val: number, isBigEndian: boolean): void
  • Parameters

    • buffer: Buffer
    • pos: number
    • val: number
    • isBigEndian: boolean

    Returns void

Static writeInt16

  • writeInt16(buffer: Buffer, pos: number, val: number, isBigEndian: boolean): void
  • Parameters

    • buffer: Buffer
    • pos: number
    • val: number
    • isBigEndian: boolean

    Returns void

Static writeInt32

  • writeInt32(buffer: Buffer, pos: number, val: number, isBigEndian: boolean): void
  • Parameters

    • buffer: Buffer
    • pos: number
    • val: number
    • isBigEndian: boolean

    Returns void

Static writeInt8

  • writeInt8(buffer: Buffer, pos: number, val: number): void
  • Parameters

    • buffer: Buffer
    • pos: number
    • val: number

    Returns void

Static writeUInt16

  • writeUInt16(buffer: Buffer, pos: number, val: number, isBigEndian: boolean): void
  • Parameters

    • buffer: Buffer
    • pos: number
    • val: number
    • isBigEndian: boolean

    Returns void

Static writeUInt32

  • writeUInt32(buffer: Buffer, pos: number, val: number, isBigEndian: boolean): void
  • Parameters

    • buffer: Buffer
    • pos: number
    • val: number
    • isBigEndian: boolean

    Returns void

Static writeUInt8

  • writeUInt8(buffer: Buffer, pos: number, val: number): void
  • Parameters

    • buffer: Buffer
    • pos: number
    • val: number

    Returns void

Generated using TypeDoc