alluxio.security.authorization.Mode.fromProto()方法的使用及代码示例

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

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

Mode.fromProto介绍

[英]Creates Mode from proto PMode.
[中]从proto-PMode创建模式。

代码示例

代码示例来源:origin: Alluxio/alluxio

/**
 * Used to get short value of a proto {@link PMode}.
 *
 * @param pMode proto mode
 * @return short value
 */
public static short protoToShort(PMode pMode) {
 return Mode.fromProto(pMode).toShort();
}

代码示例来源:origin: Alluxio/alluxio

private void loadExtractedFields() {
 com.google.protobuf.GeneratedMessageV3.Builder<?> optionsBuilder = getOptions();
 // Populate extracted fields from given options
 if (optionsBuilder instanceof CreateFilePOptions.Builder) {
  CreateFilePOptions.Builder fileOptions = (CreateFilePOptions.Builder) optionsBuilder;
  mMode = Mode.fromProto(fileOptions.getMode());
  mRecursive = fileOptions.getRecursive();
  mTtl = fileOptions.getCommonOptions().getTtl();
  mTtlAction = fileOptions.getCommonOptions().getTtlAction();
 }
 // Populate extracted fields from given options
 if (optionsBuilder instanceof CreateDirectoryPOptions.Builder) {
  CreateDirectoryPOptions.Builder dirOptions = (CreateDirectoryPOptions.Builder) optionsBuilder;
  mMode = Mode.fromProto(dirOptions.getMode());
  mRecursive = dirOptions.getRecursive();
  mTtl = dirOptions.getCommonOptions().getTtl();
  mTtlAction = dirOptions.getCommonOptions().getTtlAction();
 }
}

代码示例来源:origin: Alluxio/alluxio

mMode = Mode.fromProto(options.getMode());

相关文章