use of org.apache.hadoop.hdds.protocol.proto.HddsProtos.BlockTokenSecretProto.AccessModeProto in project ozone by apache.
the class OzoneBlockTokenIdentifier method write.
@Override
public void write(DataOutput out) throws IOException {
BlockTokenSecretProto.Builder builder = BlockTokenSecretProto.newBuilder().setBlockId(blockId).setOwnerId(getOwnerId()).setOmCertSerialId(getCertSerialId()).setExpiryDate(getExpiryDate()).setMaxLength(maxLength);
// Add access mode allowed
for (AccessModeProto mode : modes) {
builder.addModes(AccessModeProto.valueOf(mode.name()));
}
out.write(builder.build().toByteArray());
}
Aggregations