io.protostuff.Output.writeUInt64()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(7.9k)|赞(0)|评价(0)|浏览(137)

本文整理了Java中io.protostuff.Output.writeUInt64()方法的一些代码示例,展示了Output.writeUInt64()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Output.writeUInt64()方法的具体详情如下:
包路径:io.protostuff.Output
类名称:Output
方法名:writeUInt64

Output.writeUInt64介绍

[英]Writes an unsigned long field.
[中]写入一个无符号长字段。

代码示例

代码示例来源:origin: protostuff/protostuff

@Override
public void writeUInt64(int fieldNumber, long value, boolean repeated) throws IOException
{
  output.writeUInt64(fieldNumber, value, repeated);
}

代码示例来源:origin: protostuff/protostuff

@Override
public void writeTo(Output output, UnsignedNumbers message) throws IOException
{
  if (message.uint32 != null)
    output.writeUInt32(1, message.uint32, false);
  if (message.uint64 != null)
    output.writeUInt64(2, message.uint64, false);
  if (message.fixed32 != null)
    output.writeFixed32(3, message.fixed32, false);
  if (message.fixed64 != null)
    output.writeFixed64(4, message.fixed64, false);
}

代码示例来源:origin: protostuff/protostuff

@Override
public void writeTo(Output output, PojoWithInts message) throws IOException
{
  if (message.someInt32 != 0)
    output.writeInt32(1, message.someInt32, false);
  if (message.someUint32 != 0)
    output.writeUInt32(2, message.someUint32, false);
  if (message.someSint32 != 0)
    output.writeSInt32(3, message.someSint32, false);
  if (message.someFixed32 != 0)
    output.writeFixed32(4, message.someFixed32, false);
  if (message.someSfixed32 != 0)
    output.writeSFixed32(5, message.someSfixed32, false);
  if (message.someInt64 != 0)
    output.writeInt64(11, message.someInt64, false);
  if (message.someUint64 != 0)
    output.writeUInt64(12, message.someUint64, false);
  if (message.someSint64 != 0)
    output.writeSInt64(13, message.someSint64, false);
  if (message.someFixed64 != 0)
    output.writeFixed64(14, message.someFixed64, false);
  if (message.someSfixed64 != 0)
    output.writeSFixed64(15, message.someSfixed64, false);
}

代码示例来源:origin: dremio/dremio-oss

public void writeTo(Output output, UpgradeTaskRun message) throws IOException
{
  if(message.status != null)
     output.writeEnum(1, message.status.number, false);
  if(message.startTime != null)
    output.writeUInt64(2, message.startTime, false);
  if(message.endTime != null)
    output.writeUInt64(3, message.endTime, false);
}

代码示例来源:origin: NationalSecurityAgency/datawave

@Override
public void writeTo(Output output, FieldStat message) throws IOException {
  output.writeString(1, message.field, false);
  output.writeUInt64(2, message.unique, false);
  output.writeUInt64(3, message.observed, false);
  output.writeDouble(4, message.selectivity, false);
}

代码示例来源:origin: dremio/dremio-oss

public void writeTo(Output output, AccelerationMetrics message) throws IOException
{
  if(message.hits == null)
    throw new UninitializedMessageException(message);
  output.writeUInt64(1, message.hits, false);
}

代码示例来源:origin: NationalSecurityAgency/datawave

public void writeTo(Output output, DefaultMetadataQueryResponse message) throws IOException {
  if (message.totalResults != null) {
    output.writeUInt64(1, message.totalResults, false);
  }
  
  if (message.fields != null) {
    for (MetadataFieldBase field : message.fields) {
      if (field != null)
        output.writeObject(2, (DefaultMetadataField) field, DefaultMetadataField.getSchema(), true);
    }
  }
}

代码示例来源:origin: NationalSecurityAgency/datawave

public void writeTo(Output output, DefaultDataDictionary message) throws IOException {
  if (message.totalResults != null) {
    output.writeUInt64(1, message.totalResults, false);
  }
  
  if (message.fields != null) {
    for (DefaultMetadataField field : message.fields) {
      if (field != null)
        output.writeObject(2, field, DefaultMetadataField.getSchema(), true);
    }
  }
}

代码示例来源:origin: NationalSecurityAgency/datawave

public void writeTo(Output output, DefaultFields message) throws IOException {
  if (message.totalResults != null) {
    output.writeUInt64(1, message.totalResults, false);
  }
  
  if (message.fields != null) {
    for (DictionaryFieldBase fd : message.fields) {
      output.writeObject(2, (DefaultDictionaryField) fd, DefaultDictionaryField.getSchema(), true);
    }
  }
}

代码示例来源:origin: NationalSecurityAgency/datawave

public void writeTo(Output output, FileDetails message) throws IOException {
  
  if (message.getPath() != null) {
    output.writeString(1, message.getPath(), false);
  }
  if (message.getDate() != null) {
    output.writeUInt64(2, message.getDate().getTime(), false);
  }
  output.writeUInt64(3, message.getSize(), false);
}

代码示例来源:origin: dremio/dremio-oss

public void writeTo(Output output, MaterializationMetrics message) throws IOException
{
  if(message.footprint == null)
    throw new UninitializedMessageException(message);
  output.writeUInt64(1, message.footprint, false);
  if(message.originalCost == null)
    throw new UninitializedMessageException(message);
  output.writeDouble(2, message.originalCost, false);
}

代码示例来源:origin: NationalSecurityAgency/datawave

@Override
public void writeTo(Output output, DefaultFieldCardinality message) throws IOException {
  if (message.columnVisibility != null)
    output.writeString(1, message.columnVisibility, false);
  output.writeUInt64(2, message.cardinality, false);
  output.writeString(3, message.lower, false);
  output.writeString(4, message.upper, false);
}

代码示例来源:origin: NationalSecurityAgency/datawave

public void writeTo(Output output, DefaultEdgeDictionary message) throws IOException {
  if (message.metadataList != null) {
    for (DefaultMetadata metadata : message.metadataList) {
      output.writeObject(DICT_BASE.METADATA.getFieldNumber(), metadata, DefaultMetadata.getSchema(), true);
    }
  }
  if (message.totalResults != null) {
    output.writeUInt64(DICT_BASE.TOTAL.getFieldNumber(), message.totalResults, false);
  }
}

代码示例来源:origin: NationalSecurityAgency/datawave

public void writeTo(Output output, ResultFile message) throws IOException {
  
  if (message.getFileName() != null) {
    output.writeString(1, message.getFileName(), false);
  }
  
  output.writeUInt64(2, message.getLength(), false);
}

代码示例来源:origin: dremio/dremio-oss

public void writeTo(Output output, AccelerationRequest message) throws IOException
{
  if(message.username == null)
    throw new UninitializedMessageException(message);
  output.writeString(1, message.username, false);
  if(message.createdAt != null)
    output.writeUInt64(2, message.createdAt, false);
  if(message.type != null)
     output.writeEnum(3, message.type.number, false);
  if(message.context != null)
     output.writeObject(4, message.context, AccelerationRequestContext.getSchema(), false);
}

代码示例来源:origin: dremio/dremio-oss

public void writeTo(Output output, AccelerationRequestApiDescriptor message) throws IOException
{
  if(message.username == null)
    throw new UninitializedMessageException(message);
  output.writeString(1, message.username, false);
  if(message.createdAt != null)
    output.writeUInt64(2, message.createdAt, false);
  if(message.type != null)
     output.writeEnum(3, message.type.number, false);
  if(message.context != null)
     output.writeObject(4, message.context, AccelerationRequestContext.getSchema(), false);
}

代码示例来源:origin: NationalSecurityAgency/datawave

public void writeTo(Output output, History message) throws IOException {
  if (message.getState() != null) {
    output.writeString(1, message.getState(), false);
  }
  
  if (message.getTimestamp() != null) {
    output.writeUInt64(2, message.getTimestamp(), false);
  }
}

代码示例来源:origin: NationalSecurityAgency/datawave

@Override
public void writeTo(Output output, DefaultField message) throws IOException {
  if (message.markings != null)
    output.writeObject(1, message.markings, MapSchema.SCHEMA, false);
  if (message.columnVisibility != null)
    output.writeString(2, message.columnVisibility, false);
  output.writeUInt64(3, message.timestamp, false);
  if (message.name != null)
    output.writeString(4, message.name, false);
  if (message.value != null)
    output.writeObject(5, message.value, message.value.cachedSchema(), false);
}

代码示例来源:origin: NationalSecurityAgency/datawave

@Override
public void writeTo(Output output, SimpleField message) throws IOException {
  if (message.columnVisibility != null)
    output.writeString(1, message.columnVisibility, false);
  output.writeUInt64(2, message.timestamp, false);
  if (message.name != null)
    output.writeString(3, message.name, false);
  if (message.value != null)
    output.writeObject(4, message.value, message.value.cachedSchema(), false);
  if (message.markings != null) {
    output.writeObject(5, message.markings, MAP_SCHEMA, false);
  }
}

代码示例来源:origin: NationalSecurityAgency/datawave

public void writeTo(Output output, JobExecution message) throws IOException {
  
  if (message.getMapReduceJobId() != null) {
    output.writeString(1, message.getMapReduceJobId(), false);
  }
  
  output.writeUInt64(2, message.getTimestamp(), false);
  
  if (message.getState() != null) {
    output.writeString(3, message.getState(), false);
  }
}

相关文章