Class: MetaInfo

MetaInfo()

new MetaInfo()

Create a new MetaInfo with the optional values.
Source:

Methods

getChangeCount() → {number}

Get the change count, which is incremented each time this object is changed.
Source:
Returns:
The change count.
Type
number

getFinalBlockId() → {Name.Component}

Get the final block ID.
Source:
Returns:
The final block ID as a Name.Component. If the Name.Component getValue().size() is 0, then the final block ID is not specified.
Type
Name.Component

getFinalBlockID()

Deprecated:
  • Use getFinalBlockId.
Source:

getFinalBlockIDAsBuffer()

Deprecated:
  • Use getFinalBlockId. This method returns a Buffer which is the former behavior of getFinalBlockId, and should only be used while updating your code.
Source:

getFreshnessPeriod() → {number}

Get the freshness period.
Source:
Returns:
The freshness period in milliseconds, or null if not specified.
Type
number

getOtherTypeCode() → {number}

Get the content type code from the packet which is other than a recognized ContentType enum value. This is only meaningful if getType() is ContentType.OTHER_CODE.
Source:
Returns:
The type code.
Type
number

getType() → {number}

Get the content type.
Source:
Returns:
The content type as an int from ContentType. If this is ContentType.OTHER_CODE, then call getOtherTypeCode() to get the unrecognized content type code.
Type
number

setFinalBlockId(finalBlockId)

Set the final block ID.
Parameters:
Name Type Description
finalBlockId Name.Component The final block ID as a Name.Component. If not specified, set to a new default Name.Component(), or to a Name.Component where getValue().size() is 0.
Source:

setFinalBlockID()

Deprecated:
  • Use setFinalBlockId.
Source:

setFreshnessPeriod(freshnessPeriod)

Set the freshness period.
Parameters:
Name Type Description
freshnessPeriod number The freshness period in milliseconds, or null for not specified.
Source:

setOtherTypeCode(otherTypeCode)

Set the packet’s content type code to use when the content type enum is ContentType.OTHER_CODE. If the packet’s content type code is a recognized enum value, just call setType().
Parameters:
Name Type Description
otherTypeCode number The packet’s unrecognized content type code, which must be non-negative.
Source:

setType(type)

Set the content type.
Parameters:
Name Type Description
type number The content type as an int from ContentType. If null, this uses ContentType.BLOB. If the packet's content type is not a recognized ContentType enum value, use ContentType.OTHER_CODE and call setOtherTypeCode().
Source: